Estadistica

Repositorio del Broad Institute: https://gdac.broadinstitute.org Datos de cancer a nivel mundial (Acceso 4)


In [1]:
import numpy as np #libreria de datos numericos

%matplotlib inline 

import seaborn as sns
sns.set()

# inline permite imprimir en jupyter
# 1. generar numeros aleatorios
# 2. vector 
# 3. graficar la distribución (poisson, beta, normal)

n = np.random.beta(5, 1, 1000) #genera 100 valores aleatorios con los parametros a =5 y b = 1

x = np.random.beta (0.5, 0.5 , 1000)

sns.distplot(n)
sns.distplot(x)


Out[1]:
<matplotlib.axes._subplots.AxesSubplot at 0x1138f1ed0>

In [2]:
import pandas as pd

DF = pd.read_csv('/Users/camilogarcia/Downloads/gdac.broadinstitute.org_BRCA.Merge_rnaseq__illuminahiseq_rnaseq__unc_edu__Level_3__gene_expression__data.Level_3.2016012800.0.0/BRCA.rnaseq__illuminahiseq_rnaseq__unc_edu__Level_3__gene_expression__data.data.txt', sep='\t')
DF


/Users/camilogarcia/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2717: DtypeWarning: Columns (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2141,2142,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2155,2156,2157,2158,2159,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,2442,2443,2444,2445,2446,2447,2448,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,2516,2517,2518,2519,2520,2521,2522,2523,2524,2525,2526,2527,2528,2529,2530,2531,2532,2533,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2544,2545,2546,2547,2548,2549,2550,2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2601,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2634) have mixed types. Specify dtype option on import or set low_memory=False.
  interactivity=interactivity, compiler=compiler, result=result)
Out[2]:
Hybridization REF TCGA-A1-A0SB-01A-11R-A144-07 TCGA-A1-A0SB-01A-11R-A144-07.1 TCGA-A1-A0SB-01A-11R-A144-07.2 TCGA-A1-A0SD-01A-11R-A115-07 TCGA-A1-A0SD-01A-11R-A115-07.1 TCGA-A1-A0SD-01A-11R-A115-07.2 TCGA-A1-A0SE-01A-11R-A084-07 TCGA-A1-A0SE-01A-11R-A084-07.1 TCGA-A1-A0SE-01A-11R-A084-07.2 ... TCGA-GM-A2DD-01A-11R-A180-07.2 TCGA-GM-A2DF-01A-11R-A180-07 TCGA-GM-A2DF-01A-11R-A180-07.1 TCGA-GM-A2DF-01A-11R-A180-07.2 TCGA-GM-A2DH-01A-11R-A180-07 TCGA-GM-A2DH-01A-11R-A180-07.1 TCGA-GM-A2DH-01A-11R-A180-07.2 TCGA-GM-A2DK-01A-21R-A180-07 TCGA-GM-A2DK-01A-21R-A180-07.1 TCGA-GM-A2DK-01A-21R-A180-07.2
0 gene raw_counts median_length_normalized RPKM raw_counts median_length_normalized RPKM raw_counts median_length_normalized RPKM ... RPKM raw_counts median_length_normalized RPKM raw_counts median_length_normalized RPKM raw_counts median_length_normalized RPKM
1 ?|100130426 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
2 ?|100133144 115 4.7408940397351 1.19146690937079 134 5.53890728476821 1.08327022136351 119 4.85264900662252 0.648804765767191 ... 0.496258123278805 65 2.69039735099338 0.57336936864336 162 6.65894039735099 1.25258850027006 80 3.31043046357616 0.753734902894534
3 ?|100134869 59 1.85069008782936 0.46324930208213 73 2.28983688833124 0.447232631700592 72 2.25846925972396 0.297493981144456 ... 0.12295093161439 47 1.46486825595985 0.314193796680778 76 2.37892095357591 0.445333755567924 27 0.846925972396487 0.192784015000064
4 ?|10357 269 21.1477987421384 5.29354054052308 175 13.7578616352201 2.68707552797622 392 30.8176100628931 4.05941035836283 ... 3.93345184457586 266 20.9119496855346 4.45669164217304 467 36.7138364779874 6.85835726947309 232 18.2201257861635 4.15170457833354
5 ?|10431 1921 85.8550983899821 21.5048610324708 3676 164.30053667263 32.1094332306395 5835 260.711091234347 34.3742365295763 ... 42.5666139352044 4197 187.663685152057 40.0023247303838 5796 259.050983899821 48.4224671517638 3282 146.748658318426 33.4112209880393
6 ?|136542 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
7 ?|155060 1007 17.2432804962095 4.34293312170185 453 7.73121984838043 1.5244027886466 655 11.1664369400414 1.48654443723434 ... 2.12533597461052 811 13.9093728463129 2.97790961155424 841 14.3518263266713 2.70681720121152 713 12.1929703652653 2.79632532220311
8 ?|26823 9 0.827205882352941 0.20705927491495 18 1.64338235294118 0.323126477355796 13 1.18382352941176 0.157390478892857 ... 0.169536146188008 9 0.827205882352941 0.176291622621341 12 1.10294117647059 0.20603579906403 4 0.367647058823529 0.0836867428949078
9 ?|280660 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
10 ?|317712 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
11 ?|340602 5 0.128932439401753 0.0322732925201229 4 0.103145951521403 0.0201456425054786 1 0.0072202166064982 0.00339669220921625 ... 0.130802514026436 0 0 0 0 0 0 2 0.0515729757607014 0.0117394502668463
12 ?|388795 8 0.0911386013632921 0.0252776224979624 6 0.0757384498863923 0.0147926284340279 8 0.100984599848523 0.0133020675459133 ... 0.0349259013606197 9 0.113607674829588 0.0242117249952056 26 0.32441302701338 0.0613096512236312 21 0.263064882605403 0.0603406558212211
13 ?|390284 1 0.151057401812689 0.0378114285175337 2 0.302114803625378 0.059006647761515 12 1.81268882175227 0.238774121824905 ... 0.243804246481848 1 0.151057401812689 0.0321928978536453 8 1.202416918429 0.225747179639138 6 0.906344410876133 0.206309311789259
14 ?|391343 0 0 0 2 0.0380807311500381 0.00743762391814983 2 0.0380807311500381 0.00501613571490503 ... 0.0526814528901045 2 0.0380807311500381 0.00811565056325712 8 0.152322924600152 0.0284548044404245 0 0 0
15 ?|391714 4 0.141435678749112 0.0355809035943245 2 0.0504619758351102 0.0138814501841233 2 0.0710732054015636 0.00936202728311345 ... 0.0327745783675467 0 0 0 2 0.0632551528073916 0.0132768863647041 0 0 0
16 ?|404770 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
17 ?|441362 0 0 0 2 0.0618429189857761 0.0120786644459255 2 0.04143475572047 0.0081461795840078 ... 0 0 0 0 6 0.185528756957328 0.0346578462247471 0 0 0
18 ?|442388 0 0 0 0 0 0 0 0 0 ... 0.118605534370211 0 0 0 0 0 0 0 0 0
19 ?|553137 0 0 0 8 0.162866449511401 0.0318097726531946 8 0.162866449511401 0.0214533752236818 ... 0.168983911184138 256 5.16734527687296 1.11070740738049 28 0.570032573289902 0.106485385835481 6 0.115228013029316 0.0278047158803928
20 ?|57714 1408 14.6589390142022 3.68043872968662 4816 50.1988304093567 9.82270897765664 3613 37.6083959899749 4.96990198783016 ... 4.60367827543443 847 8.81516290726817 1.88502595312332 10867 113.260651629073 21.1990239394541 743 7.73767752715121 1.76616081788735
21 ?|645851 101 5.75635103926097 1.45966959211278 110 6.22863741339492 1.24043420611822 98 5.62586605080831 0.745318991893407 ... 0.545804590729984 76 4.36951501154734 0.935155356127369 292 16.6662817551963 3.14938169839521 38 2.19399538106236 0.499414650439819
22 ?|652919 142 2.13533834586466 0.534500079152216 160 2.40601503759398 0.469923618864637 154 2.31578947368421 0.30504441318052 ... 0.124819394246088 33 0.496240601503759 0.105757300227178 204 3.06766917293233 0.573058366840345 21 0.315789473684211 0.0718825075813103
23 ?|653553 81 10.6299212598425 2.66079320205668 749 98.2808398950131 19.1979909532638 1871 245.115485564304 32.3431873185227 ... 92.8025735023259 720 94.3333333333333 20.1370378385322 467 61.249343832021 11.448596386837 5429 711.650918635171 162.177439622042
24 ?|728045 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
25 ?|728603 0 0 0 2 0.053475935828877 0.0104444921973591 3 0.0802139037433155 0.0105660741074925 ... 0 0 0 0 2 0.053475935828877 0.00998961450007417 0 0 0
26 ?|728788 38 2.3393085787452 0.608952814204275 9 0.57618437900128 0.112535725788446 9 0.567221510883483 0.0758971520397347 ... 0.103328048124829 8 0.512163892445583 0.109150823964728 19 1.14852752880922 0.227228555177743 6 0.345710627400768 0.0874371090937833
27 ?|729884 0 0 0 48 1.12359550561798 0.219451689989455 22 0.51498127340824 0.0678352510584021 ... 1.65694596808092 8 0.187265917602996 0.0399095475264292 2 0.0468164794007491 0.00874558947337954 8 0.187265917602996 0.042626955182425
28 ?|8225 1642 56.5437629221227 14.1630510145669 1497 51.526533425224 10.0751919408563 5022 172.879393521709 22.7951943932545 ... 11.774758558403 2875 99.0144727773949 21.1134158649037 4834 166.439007580979 31.1171328196349 2123 73.0840799448656 16.6524506564858
29 ?|90288 22 0.500230520977409 0.126944593114191 77 1.74965421853389 0.346681058436545 682 15.6855693868142 2.0708985634316 ... 0.191343700261984 6 0.138312586445367 0.0294767612435867 183 4.17750115260489 0.7880465601822 92 2.10235131396957 0.482751741402069
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
20503 ZSCAN20|7579 398 4.74148 1.18685 307 3.65166 0.714329 634 7.54348 0.994911 ... 0.423012 171 2.03717 0.434155 785 9.34954 1.74699 155 1.84656 0.420328
20504 ZSCAN21|7589 745 19.0072 4.76449 1008 25.746 5.03001 1818 46.4205 6.11839 ... 4.38282 577 14.742 3.14176 1317 33.6254 6.28572 674 17.2151 3.91981
20505 ZSCAN22|342945 519 5.65729 1.41609 765 8.33769 1.62866 1077 11.7384 1.5464 ... 1.3999 346 3.77022 0.803777 886 9.64661 1.80412 519 5.65707 1.28776
20506 ZSCAN23|222696 369 6.87836 1.72323 182 3.39552 0.663186 416 7.74179 1.02233 ... 0.20648 6 0.11194 0.0238564 36 0.671642 0.125467 23 0.429104 0.0976762
20507 ZSCAN29|146050 2134 20.2101 5.06414 3218 30.5044 5.95861 3866 36.6439 4.82787 ... 3.02966 851 8.06598 1.7194 1761 16.689 3.11874 1131 10.7224 2.44072
20508 ZSCAN2|54993 1468 65.3645 16.3751 1819 81.0294 15.8321 2430 108.13 14.2642 ... 7.50069 466 20.7121 4.42569 1891 84.2344 15.742 1252 55.6649 12.7001
20509 ZSCAN4|201516 5 0.110619 0.0276893 14 0.309735 0.0604949 7 0.136726 0.0203997 ... 0.0714152 3 0.0641593 0.0141449 6 0.132743 0.0247972 4 0.0884956 0.0201441
20510 ZSCAN5A|79149 307 8.18713 2.06021 167 4.46702 0.874453 302 8.03432 1.0665 ... 2.55295 138 3.69705 0.788476 637 17.0231 3.19022 231 6.16676 1.40971
20511 ZSCAN5B|342933 10 0.307503 0.0769716 0 0 0 2 0.0615006 0.00810109 ... 0.0567206 2 0.0615006 0.0131068 2 0.0615006 0.0114887 0 0 0
20512 ZSWIM1|90204 1098 25.434 6.38574 1832 42.428 8.31347 1828 42.4182 5.59459 ... 5.98923 794 18.3666 3.93157 1702 39.4201 7.38716 1666 38.612 8.81106
20513 ZSWIM2|151112 0 0 0 0 0 0 4 0.0817661 0.0107705 ... 0 0 0 0 2 0.0408831 0.0076372 0 0 0
20514 ZSWIM3|140831 441 7.71169 1.9312 471 8.23793 1.60938 522 9.11686 1.20294 ... 1.27467 243 4.25122 0.906008 631 11.0283 2.06218 360 6.29811 1.43363
20515 ZSWIM4|65249 2052 24.161 6.05421 1155 13.6077 2.65895 2160 25.417 3.35365 ... 6.4056 1422 16.7508 3.57205 1951 22.962 4.29583 879 10.3529 2.35838
20516 ZSWIM5|57643 259 2.20307 0.553163 682 5.81331 1.13654 929 7.88874 1.04412 ... 0.523305 36 0.302389 0.0654626 1129 9.58754 1.79952 304 2.58072 0.590434
20517 ZSWIM6|57688 1255 11.3334 2.846 1872 16.9188 3.31241 2699 24.4064 3.22089 ... 2.02411 889 8.01975 1.71644 2132 19.2305 3.60817 2003 18.0939 4.13063
20518 ZSWIM7|125150 1165 30.9771 7.76393 816 21.6699 4.2432 1593 42.3946 5.58669 ... 5.73967 813 21.606 4.613 1370 36.3775 6.81374 1264 33.6203 7.66032
20519 ZUFSP|221302 534 14.946 3.7589 1011 28.3825 5.55288 816 22.9229 3.02268 ... 3.26791 521 14.5771 3.12244 1793 50.3071 9.41909 783 21.9488 5.01217
20520 ZW10|9183 2008 35.023 8.76877 1690 29.4836 5.7585 2309 40.2809 5.30618 ... 3.41107 1223 21.336 4.54714 5979 104.304 19.4856 1302 22.7024 5.17047
20521 ZWILCH|55055 1522 24.0899 6.02998 1711 27.0814 5.28931 2803 44.3384 5.84396 ... 3.81362 2011 31.8246 6.78345 5807 91.9028 17.1697 2324 36.7752 8.37302
20522 ZWINT|11130 1133 35.0421 8.77485 3027 93.6572 18.2924 5296 163.853 21.5844 ... 16.0371 2765 85.5223 18.2323 19714 609.82 113.945 1133 35.0557 7.97966
20523 ZXDA|7789 431 7.45149 1.8691 669 11.5679 2.26375 1050 18.1733 2.39622 ... 0.499327 99 1.70478 0.365533 807 13.9709 2.61179 173 2.9896 0.682253
20524 ZXDB|158586 1601 14.1453 3.54582 2441 21.5641 4.21834 4194 37.0685 4.88807 ... 1.45253 475 4.2028 0.895687 3051 26.9589 5.04286 2949 26.049 5.93943
20525 ZXDC|79364 4616 64.3016 16.1194 5725 79.7483 15.5993 6790 94.6203 12.4777 ... 7.80037 2393 33.3491 7.1148 6470 90.1708 16.8615 3386 47.1855 10.7526
20526 ZYG11A|440590 176 2.25372 0.564516 288 3.68913 0.720782 566 7.24577 0.955351 ... 1.92633 375 4.80395 1.02408 3133 40.1292 7.49952 850 10.8906 2.47929
20527 ZYG11B|79699 4785 32.9284 8.24323 4484 30.8529 6.02738 6385 43.9233 5.78841 ... 4.09248 2541 17.4847 3.72698 8854 60.9291 11.3832 2878 19.8022 4.50869
20528 ZYX|7791 16914 409.425 102.513 13268 321.205 62.7458 18973 459.133 60.5132 ... 109.462 19844 480.334 102.399 10610 256.781 47.9905 11880 287.596 65.4775
20529 ZZEF1|23140 6095 94.7092 23.7492 5569 86.5112 16.9317 6234 96.8543 12.7828 ... 11.4423 1778 27.5704 5.89854 6020 93.5535 17.5058 3266 50.6519 11.5727
20530 ZZZ3|26009 4819 71.3995 17.8863 5499 81.4754 15.9256 6810 100.889 13.3013 ... 6.19159 1497 22.1945 4.73067 6043 89.5302 16.7388 1728 25.6062 5.83246
20531 psiTPTE22|387590 2692 93.5262 23.5773 767 26.6879 5.24158 7148 249.484 32.9448 ... 5.08253 1209 42.1155 9.01534 639 22.1714 4.17666 576 20.0462 4.5876
20532 tAKR|389932 16 0.825593 0.206656 8 0.412797 0.0806242 18 0.928793 0.122344 ... 0.0475891 12 0.619195 0.131961 24 1.23839 0.231338 6 0.309598 0.070473

20533 rows × 2635 columns


In [21]:
DF = DF.drop([0]) # eliminar la prmiera fila


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-21-abcba4975a13> in <module>()
----> 1 DF = DF.drop([0]) # eliminar la prmiera fila
      2 
      3 DF.loc[1]

/Users/camilogarcia/anaconda/lib/python2.7/site-packages/pandas/core/generic.pyc in drop(self, labels, axis, level, inplace, errors)
   1905                 new_axis = axis.drop(labels, level=level, errors=errors)
   1906             else:
-> 1907                 new_axis = axis.drop(labels, errors=errors)
   1908             dropped = self.reindex(**{axis_name: new_axis})
   1909             try:

/Users/camilogarcia/anaconda/lib/python2.7/site-packages/pandas/indexes/base.pyc in drop(self, labels, errors)
   3260             if errors != 'ignore':
   3261                 raise ValueError('labels %s not contained in axis' %
-> 3262                                  labels[mask])
   3263             indexer = indexer[~mask]
   3264         return self.delete(indexer)

ValueError: labels [0] not contained in axis

In [4]:
DF.head()


Out[4]:
Hybridization REF TCGA-A1-A0SB-01A-11R-A144-07 TCGA-A1-A0SB-01A-11R-A144-07.1 TCGA-A1-A0SB-01A-11R-A144-07.2 TCGA-A1-A0SD-01A-11R-A115-07 TCGA-A1-A0SD-01A-11R-A115-07.1 TCGA-A1-A0SD-01A-11R-A115-07.2 TCGA-A1-A0SE-01A-11R-A084-07 TCGA-A1-A0SE-01A-11R-A084-07.1 TCGA-A1-A0SE-01A-11R-A084-07.2 ... TCGA-GM-A2DD-01A-11R-A180-07.2 TCGA-GM-A2DF-01A-11R-A180-07 TCGA-GM-A2DF-01A-11R-A180-07.1 TCGA-GM-A2DF-01A-11R-A180-07.2 TCGA-GM-A2DH-01A-11R-A180-07 TCGA-GM-A2DH-01A-11R-A180-07.1 TCGA-GM-A2DH-01A-11R-A180-07.2 TCGA-GM-A2DK-01A-21R-A180-07 TCGA-GM-A2DK-01A-21R-A180-07.1 TCGA-GM-A2DK-01A-21R-A180-07.2
1 ?|100130426 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
2 ?|100133144 115 4.7408940397351 1.19146690937079 134 5.53890728476821 1.08327022136351 119 4.85264900662252 0.648804765767191 ... 0.496258123278805 65 2.69039735099338 0.57336936864336 162 6.65894039735099 1.25258850027006 80 3.31043046357616 0.753734902894534
3 ?|100134869 59 1.85069008782936 0.46324930208213 73 2.28983688833124 0.447232631700592 72 2.25846925972396 0.297493981144456 ... 0.12295093161439 47 1.46486825595985 0.314193796680778 76 2.37892095357591 0.445333755567924 27 0.846925972396487 0.192784015000064
4 ?|10357 269 21.1477987421384 5.29354054052308 175 13.7578616352201 2.68707552797622 392 30.8176100628931 4.05941035836283 ... 3.93345184457586 266 20.9119496855346 4.45669164217304 467 36.7138364779874 6.85835726947309 232 18.2201257861635 4.15170457833354
5 ?|10431 1921 85.8550983899821 21.5048610324708 3676 164.30053667263 32.1094332306395 5835 260.711091234347 34.3742365295763 ... 42.5666139352044 4197 187.663685152057 40.0023247303838 5796 259.050983899821 48.4224671517638 3282 146.748658318426 33.4112209880393

5 rows × 2635 columns


In [42]:
r = DF['TCGA-A1-A0SB-01A-11R-A144-07.1'] # put the values of the column df to r 

r


r = pd.to_numeric(r) # some values are different to numbers


Out[42]:
1                         0
2           4.7408940397351
3          1.85069008782936
4          21.1477987421384
5          85.8550983899821
6                         0
7          17.2432804962095
8         0.827205882352941
9                         0
10                        0
11        0.128932439401753
12       0.0911386013632921
13        0.151057401812689
14                        0
15        0.141435678749112
16                        0
17                        0
18                        0
19                        0
20         14.6589390142022
21         5.75635103926097
22         2.13533834586466
23         10.6299212598425
24                        0
25                        0
26          2.3393085787452
27                        0
28         56.5437629221227
29        0.500230520977409
30         3.19088766692852
                ...        
20503               4.74148
20504               19.0072
20505               5.65729
20506               6.87836
20507               20.2101
20508               65.3645
20509              0.110619
20510               8.18713
20511              0.307503
20512                25.434
20513                     0
20514               7.71169
20515                24.161
20516               2.20307
20517               11.3334
20518               30.9771
20519                14.946
20520                35.023
20521               24.0899
20522               35.0421
20523               7.45149
20524               14.1453
20525               64.3016
20526               2.25372
20527               32.9284
20528               409.425
20529               94.7092
20530               71.3995
20531               93.5262
20532              0.825593
Name: TCGA-A1-A0SB-01A-11R-A144-07.1, dtype: object

In [68]:
DF.loc[56]


Out[68]:
Hybridization REF                        AASS|10157
TCGA-A1-A0SB-01A-11R-A144-07                   1587
TCGA-A1-A0SB-01A-11R-A144-07.1     13.6199312714777
TCGA-A1-A0SB-01A-11R-A144-07.2     3.41275428968641
TCGA-A1-A0SD-01A-11R-A115-07                   1852
TCGA-A1-A0SD-01A-11R-A115-07.1     15.9082474226804
TCGA-A1-A0SD-01A-11R-A115-07.2     3.10754150838332
TCGA-A1-A0SE-01A-11R-A084-07                   2014
TCGA-A1-A0SE-01A-11R-A084-07.1     17.2955326460481
TCGA-A1-A0SE-01A-11R-A084-07.2     2.27913728420137
TCGA-A1-A0SF-01A-11R-A144-07                    852
TCGA-A1-A0SF-01A-11R-A144-07.1     7.31769759450172
TCGA-A1-A0SF-01A-11R-A144-07.2     1.92001194799097
TCGA-A1-A0SG-01A-11R-A144-07                    469
TCGA-A1-A0SG-01A-11R-A144-07.1     4.01821305841924
TCGA-A1-A0SG-01A-11R-A144-07.2    0.965129133618333
TCGA-A1-A0SH-01A-11R-A084-07                   2278
TCGA-A1-A0SH-01A-11R-A084-07.1     19.5611683848797
TCGA-A1-A0SH-01A-11R-A084-07.2     2.42745579804307
TCGA-A1-A0SI-01A-11R-A144-07                    884
TCGA-A1-A0SI-01A-11R-A144-07.1     7.57852233676976
TCGA-A1-A0SI-01A-11R-A144-07.2     1.63608714701755
TCGA-A1-A0SJ-01A-11R-A084-07                   1547
TCGA-A1-A0SJ-01A-11R-A084-07.1     13.2850515463918
TCGA-A1-A0SJ-01A-11R-A084-07.2     1.86684109970372
TCGA-A1-A0SK-01A-12R-A084-07                    829
TCGA-A1-A0SK-01A-12R-A084-07.1     7.09982817869416
TCGA-A1-A0SK-01A-12R-A084-07.2    0.905459617459822
TCGA-A1-A0SM-01A-11R-A084-07                   1775
TCGA-A1-A0SM-01A-11R-A084-07.1     15.2378006872852
                                        ...        
TCGA-EW-A2FW-01A-11R-A17B-07                   1270
TCGA-EW-A2FW-01A-11R-A17B-07.1     10.9087628865979
TCGA-EW-A2FW-01A-11R-A17B-07.2     1.60102181647788
TCGA-GI-A2C8-11A-22R-A16F-07                   1052
TCGA-GI-A2C8-11A-22R-A16F-07.1     9.02353951890034
TCGA-GI-A2C8-11A-22R-A16F-07.2     1.56854802119611
TCGA-GI-A2C8-01A-11R-A16F-07                    901
TCGA-GI-A2C8-01A-11R-A16F-07.1      7.7340206185567
TCGA-GI-A2C8-01A-11R-A16F-07.2     1.43630182562309
TCGA-GM-A2D9-01A-11R-A18M-07                   1001
TCGA-GM-A2D9-01A-11R-A18M-07.1     8.59553264604811
TCGA-GM-A2D9-01A-11R-A18M-07.2     2.05226584390785
TCGA-GM-A2DB-01A-31R-A18M-07                    635
TCGA-GM-A2DB-01A-31R-A18M-07.1     5.45274914089347
TCGA-GM-A2DB-01A-31R-A18M-07.2     1.20379294122199
TCGA-GM-A2DC-01A-11R-A18M-07                    628
TCGA-GM-A2DC-01A-11R-A18M-07.1      5.3946735395189
TCGA-GM-A2DC-01A-11R-A18M-07.2      1.0865469921428
TCGA-GM-A2DD-01A-11R-A180-07                    684
TCGA-GM-A2DD-01A-11R-A180-07.1     5.87233676975945
TCGA-GM-A2DD-01A-11R-A180-07.2     1.35489093324684
TCGA-GM-A2DF-01A-11R-A180-07                    483
TCGA-GM-A2DF-01A-11R-A180-07.1     4.14896907216495
TCGA-GM-A2DF-01A-11R-A180-07.2    0.884325628617842
TCGA-GM-A2DH-01A-11R-A180-07                    792
TCGA-GM-A2DH-01A-11R-A180-07.1     6.80240549828179
TCGA-GM-A2DH-01A-11R-A180-07.2     1.27104971298882
TCGA-GM-A2DK-01A-21R-A180-07                    940
TCGA-GM-A2DK-01A-21R-A180-07.1     8.07199312714777
TCGA-GM-A2DK-01A-21R-A180-07.2      1.8382325105988
Name: 56, dtype: object

In [81]:
# Genes = DF[DF['Hybridization REF'].isin(['?|100134869', 'ZSCAN20|7579'])]

Genes = DF.iloc[[2,3,56],range(3,879,3)]

Genes

#Gene_3 = Genes.iloc[0] 
#Gene_4 = Genes.iloc[1]
Gene_5 = Genes.iloc[2]


#Gene_3 = pd.to_numeric(Gene_3)
#Gene_4 = pd.to_numeric(Gene_4)
Gene_5 = pd.to_numeric(Gene_5)

In [6]:
sns.distplot(r[r > 400])


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x11bb77d90>

In [82]:
sns.distplot(Gene_3)
sns.distplot(Gene_4)
sns.distplot(Gene_5)


Out[82]:
<matplotlib.axes._subplots.AxesSubplot at 0x11d03c2d0>

In [ ]: