<p>I don't know where you could look this up and of course this will depend on the versions of the relevant genomes and on which exact assemblies you are working with. I doubt you would have found this specific number, how many Ns anywhere, but it's really not very hard to get them. For instance, I have hg19 and hg38 versions locally:</p>
<pre><code>$ for genome in hg19 hg38 ; do ls $genome/$genome.fa; done
hg19/hg19.fa
hg38/hg38.fa
</code></pre>
<p>This means I can get the Ns for both using:</p>
<pre><code>for genome in hg19 hg38 ; do 
  FastaToTbl &quot;$genome&quot;/$genome.fa | 
    perl -ne 'print if /^(chr)?[0-9MXY]*\s/' | 
      awk -F&quot;\t&quot; '{ print $1, split($2,a,/[nN]/)}' &gt; $genome.ns
done
</code></pre>
<p>And then combine into a nice table with:</p>
<pre><code>$ printf 'chr\thg19\thg38\n-----------------------\n'; 
  join -j1 -t ' ' &lt;( sed 's/chr//' hg19 | sort -gk1,1 ) \
                  &lt;( sed 's/chr//'  hg38 | sort -gk1,1) | 
                   column -t | sed 's/^/chr/'
chr hg19    hg38
-----------------------
chrM   1         2
chrX   4170001   1147867
chrY   33720001  30812373
chr1   23970001  18475411
chr2   4994856   1645302
chr3   3225296   195425
chr4   3492601   461889
chr5   3220001   272882
chr6   3720002   727458
chr7   3785001   375843
chr8   3475101   370501
chr9   21070001  16604168
chr10  4220010   534461
chr11  3877001   552881
chr12  3370503   137494
chr13  19580001  16381204
chr14  19060001  16475570
chr15  20836627  17349865
chr16  11470001  8532403
chr17  3400001   337238
chr18  3420020   283681
chr19  3320001   176859
chr20  3520001   499911
chr21  13023254  6621365
chr22  16410022  11658692
</code></pre>
<p>The fancy sed stuff is just to ensure that sorting works correctly by removing and then re-adding the <code>chr</code> string. Note that this is counting both <code>N</code> and <code>n</code>. The FastaToTbl script can be found <a href="https://bioinformatics.stackexchange.com/a/2651/298">here</a>.</p>

CC BY-SA 4.0
2023-11-08T13:53:17.557Z
2023-11-08T15:45:49.903Z
2023-11-08T15:45:49.903Z
terdon
<p>This is kind of pedantic, but I'm not sure where to look...</p>
<p>For GRCh38 (and a lot of work...) I have the following...</p>
<pre><code>Chr          Length         Ns   ns
chr1    248,956,422 18,475,229  181
chr2    242,193,529   1645,291   10
chr3    198,295,559    195,420    4
chr4    190,214,555    461,888    0
chr5    181,538,259    272,881    0
chr6    170,805,979    727,255  202
chr7    159,345,973    375,841    1
chr8    145,138,636    370,500    0
chr9    138,394,717 16,604,127   40
chr10   133,797,422    534,287  173
chr11   135,086,622    552,880    0
chr12   133,275,309    137,270  223
chr13   114,364,328 163,81,200    3
chr14   107,043,718 164,75,569    0
chr15   101,991,189 173,49,841   23
chr16    90,338,345   8532,401    1
chr17    83,257,441    336,367  870
chr18    80,373,285    283,627   53
chr19    58,617,616    176,858    0
chr20    64,444,167    499,586  324
chr21    46,709,983  6,621,300   64
chr22    50,818,468 11,658,691    0
chrX    156,040,895  1,147,765  101
chrY     57,227,415 30,812,232  140
chrM         16,569          1    0
</code></pre>
<p>(Where) could I have looked this up?</p>
<p>What are the counts for GRCh37?</p>

<human-genome><repeat>
How many Ns and ns in GRCh37 / GRCh38 per 'canonical' chromosome?
# How many Ns and ns in GRCh37 / GRCh38 per 'canonical' chromosome?

(Asked by: username_0 on 2023-11-07)

This is kind of pedantic, but I'm not sure where to look...
For GRCh38 (and a lot of work...) I have the following...
Chr          Length         Ns   ns
chr1    248,956,422 18,475,229  181
chr2    242,193,529   1645,291   10
chr3    198,295,559    195,420    4
chr4    190,214,555    461,888    0
chr5    181,538,259    272,881    0
chr6    170,805,979    727,255  202
chr7    159,345,973    375,841    1
chr8    145,138,636    370,500    0
chr9    138,394,717 16,604,127   40
chr10   133,797,422    534,287  173
chr11   135,086,622    552,880    0
chr12   133,275,309    137,270  223
chr13   114,364,328 163,81,200    3
chr14   107,043,718 164,75,569    0
chr15   101,991,189 173,49,841   23
chr16    90,338,345   8532,401    1
chr17    83,257,441    336,367  870
chr18    80,373,285    283,627   53
chr19    58,617,616    176,858    0
chr20    64,444,167    499,586  324
chr21    46,709,983  6,621,300   64
chr22    50,818,468 11,658,691    0
chrX    156,040,895  1,147,765  101
chrY     57,227,415 30,812,232  140
chrM         16,569          1    0

(Where) could I have looked this up?
What are the counts for GRCh37?

**Tags:** human-genome, repeat

---

## 1 answers

### Answer by username_1 on 2023-11-08. Score: 1

I don't know where you could look this up and of course this will depend on the versions of the relevant genomes and on which exact assemblies you are working with. I doubt you would have found this specific number, how many Ns anywhere, but it's really not very hard to get them. For instance, I have hg19 and hg38 versions locally:
$ for genome in hg19 hg38 ; do ls $genome/$genome.fa; done
hg19/hg19.fa
hg38/hg38.fa

This means I can get the Ns for both using:
for genome in hg19 hg38 ; do 
  FastaToTbl "$genome"/$genome.fa | 
    perl -ne 'print if /^(chr)?[0-9MXY]*\s/' | 
      awk -F"\t" '{ print $1, split($2,a,/[nN]/)}' > $genome.ns
done

And then combine into a nice table with:
$ printf 'chr\thg19\thg38\n-----------------------\n'; 
  join -j1 -t ' ' <( sed 's/chr//' hg19 | sort -gk1,1 ) \
                  <( sed 's/chr//'  hg38 | sort -gk1,1) | 
                   column -t | sed 's/^/chr/'
chr hg19    hg38
-----------------------
chrM   1         2
chrX   4170001   1147867
chrY   33720001  30812373
chr1   23970001  18475411
chr2   4994856   1645302
chr3   3225296   195425
chr4   3492601   461889
chr5   3220001   272882
chr6   3720002   727458
chr7   3785001   375843
chr8   3475101   370501
chr9   21070001  16604168
chr10  4220010   534461
chr11  3877001   552881
chr12  3370503   137494
chr13  19580001  16381204
chr14  19060001  16475570
chr15  20836627  17349865
chr16  11470001  8532403
chr17  3400001   337238
chr18  3420020   283681
chr19  3320001   176859
chr20  3520001   499911
chr21  13023254  6621365
chr22  16410022  11658692

The fancy sed stuff is just to ensure that sorting works correctly by removing and then re-adding the chr string. Note that this is counting both N and n. The FastaToTbl script can be found here.


---

