FANDOM


How big is the genome in base pairs? Which are the largest chromosomes?

==Output==
+------------+
| sum(size)  |
+------------+ 
| 3137161264 | 
+------------+

+-----------------------+-----------+---------+
| chrom                 | size      | percent |
+-----------------------+-----------+---------+
| chr1                  | 249250621 | 7.94510 |
| chr2                  | 243199373 | 7.75221 |
| chr3                  | 198022430 | 6.31215 |
| chr4                  | 191154276 | 6.09322 |
| chr5                  | 180915260 | 5.76685 |
| chr6                  | 171115067 | 5.45446 |
| chr7                  | 159138663 | 5.07270 |
| chrX                  | 155270560 | 4.94940 |
| chr8                  | 146364022 | 4.66549 |
| chr9                  | 141213431 | 4.50131 |
| chr10                 | 135534747 | 4.32030 |
| chr11                 | 135006516 | 4.30346 |
| chr12                 | 133851895 | 4.26666 |
| chr13                 | 115169878 | 3.67115 |
| chr14                 | 107349540 | 3.42187 |
| chr15                 | 102531392 | 3.26829 |
| chr16                 |  90354753 | 2.88014 |
| chr17                 |  81195210 | 2.58817 |
| chr18                 |  78077248 | 2.48879 |
| chr20                 |  63025520 | 2.00900 |
| chrY                  |  59373566 | 1.89259 |
| chr19                 |  59128983 | 1.88479 |
| chr22                 |  51304566 | 1.63538 |
| chr21                 |  48129895 | 1.53419 |
<snip!>

We can see that the total genome size is 3.13Gb. The longest chromosome (unsurprisingly) is chromosome 1, which accounts for nearly 8% of the total. However, the shortest is not chromosome 22, but actually chromosome 21 (1.5% of the total). Note that the reference genome also includesa large number of unplaced contigs and alternative haplotypes that aren't shown in the above output. Together, these additional sequences account for 1.32% of the total.

Running the scriptEdit

This script just consists of two MySQL commands that can be run directly from the command line (presuming you have MySQL installed).

> mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e "select sum(size) from hg19.chromInfo"
> mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e "select chrom, size, 100.0*size / (select sum(size) from hg19.chromInfo) as percent from hg19.chromInfo"


RequirementsEdit

This script needs MySql. The data is accessed directly from UCSC.

==Code==

None.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.