<p>The most recent annotation of GRCh37 assembly by NCBI RefSeq is here: <a href="https://ftp.ncbi.nlm.nih.gov/genomes/Homo_sapiens/GRCh37.p13_interim_annotation/" rel="nofollow noreferrer">https://ftp.ncbi.nlm.nih.gov/genomes/Homo_sapiens/GRCh37.p13_interim_annotation/</a></p>

<p>You can download the annotation in GFF3 format from that path and use it with featurecounts tool by first converting it to the SAF format using the commands shown below:</p>

<pre><code><span class="math-container">$ zgrep -v '^#' annotation.gff.gz \
    | awk 'BEGIN{FS="\t";OFS="\t"}($</span>3=="exon"){print <span class="math-container">$1,$</span>4,<span class="math-container">$5,$</span>7,<span class="math-container">$9}' \
    | sed -r 's/ID.*GeneID:([0-9]*).*/\1/g' \
    | awk 'BEGIN{FS="\t";OFS="\t"}{print $5,$1,$2,$3,$</span>4}'
    &gt; annotation.saf
</code></pre>

<p>You should confirm that the chromosome sequence identifiers in the BAM file and the SAF file match. NCBI annotation has identifiers in the accession.version format whereas UCSC uses <code>chr#</code> format and Ensembl uses <code>#</code>. For this, you can use the <code>-A</code> parameter from <code>featureCounts</code>. Assuming that your BAM file uses UCSC-style identifiers, you can generate a 'chromosome name alias file' that can be used with featureCounts as follows: </p>

<pre><code>## get NCBI assembly report for GRCh37
wget -nv ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/405/GCF_000001405.24_GRCh37.p12/GCF_000001405.24_GRCh37.p12_assembly_report.txt

## generate chr_alias.csv file
grep -v '^#' GCF_000001405.24_GRCh37.p12_assembly_report.txt \
    | dos2unix \
    | awk 'BEGIN{FS="\t";OFS=","}(<span class="math-container">$10!="na"){print $10,$</span>7}' \
    &gt; chr_alias.csv
</code></pre>

CC BY-SA 4.0
2019-04-11T12:06:49.433Z
I didn't know about "SAF" format. I use gff with FeatureCounts. For the record, according to https://www.rdocumentation.org/packages/Rsubread/versions/1.22.2/topics/featureCounts: "The SAF annotation format has five required columns, including GeneID, Chr, Start, End and Strand. These columns can be in any order".
bli
CC BY-SA 4.0
2019-04-10T17:07:57.997Z
2019-04-10T17:07:57.997Z
vkkodali
<p>I have been given a bunch of .bam files, that come from the alignment on GRCh37d5 of human genome by Star tool. I want to extract raw read counts from these bam files by FEATURECOUNTS tool so I need a GTF. I googled a lot but I did not find GTF for GRCh37d5. I used another GTFs and I obtained weird features. Please one of you help me in finding this specific GTF. I converted a bam to fastq and I used Salmon to quantify gene expression by a transcripome.fasta but rate of mapping was 0.06</p>

CC BY-SA 4.0
2019-04-10T18:30:26.257Z
It's helpful to know that GRCh37 refers to the **G**enome **R**eference **C**onsortium assembly of the **h**uman genome, version **37** (should be equivalent to hg19 from UCSC). I've never seen "5d" though. Often times GRC will introduce "patch" updates with minor changes that don't change the primary coordinate system—that's what `p13` refers to in kayvee's answer below.
Daniel Standage
CC BY-SA 4.0
2019-04-10T18:58:05.973Z
@DanielStandage Might be of interest to you: https://www.biostars.org/p/328824/#330791
Ram RS
<rna-seq><phylogenetics><sequence-annotation><gtf>
A GTF annotation for GRCH375d version
# A GTF annotation for GRCH375d version

(Asked by: username_0 on 2019-04-10)

I have been given a bunch of .bam files, that come from the alignment on GRCh37d5 of human genome by Star tool. I want to extract raw read counts from these bam files by FEATURECOUNTS tool so I need a GTF. I googled a lot but I did not find GTF for GRCh37d5. I used another GTFs and I obtained weird features. Please one of you help me in finding this specific GTF. I converted a bam to fastq and I used Salmon to quantify gene expression by a transcripome.fasta but rate of mapping was 0.06

**Tags:** rna-seq, phylogenetics, sequence-annotation, gtf
> **Comments:**
> **username_1**: It's helpful to know that GRCh37 refers to the **G**enome **R**eference **C**onsortium assembly of the **h**uman genome, version **37** (should be equivalent to hg19 from UCSC). I've never seen "5d" though. Often times GRC will introduce "patch" updates with minor changes that don't change the primary coordinate system—that's what `p13` refers to in kayvee's answer below.  
> **username_2**: @DanielStandage Might be of interest to you: https://www.biostars.org/p/328824/#330791  

---

## 1 answers

### Answer by username_3 on 2019-04-10. Score: 2 | Accepted answer

The most recent annotation of GRCh37 assembly by NCBI RefSeq is here: https://ftp.ncbi.nlm.nih.gov/genomes/Homo_sapiens/GRCh37.p13_interim_annotation/
You can download the annotation in GFF3 format from that path and use it with featurecounts tool by first converting it to the SAF format using the commands shown below:
$ zgrep -v '^#' annotation.gff.gz \
    | awk 'BEGIN{FS="\t";OFS="\t"}($3=="exon"){print $1,$4,$5,$7,$9}' \
    | sed -r 's/ID.*GeneID:([0-9]*).*/\1/g' \
    | awk 'BEGIN{FS="\t";OFS="\t"}{print $5,$1,$2,$3,$4}'
    > annotation.saf

You should confirm that the chromosome sequence identifiers in the BAM file and the SAF file match. NCBI annotation has identifiers in the accession.version format whereas UCSC uses chr# format and Ensembl uses #. For this, you can use the -A parameter from featureCounts. Assuming that your BAM file uses UCSC-style identifiers, you can generate a 'chromosome name alias file' that can be used with featureCounts as follows: 
## get NCBI assembly report for GRCh37
wget -nv ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/405/GCF_000001405.24_GRCh37.p12/GCF_000001405.24_GRCh37.p12_assembly_report.txt

## generate chr_alias.csv file
grep -v '^#' GCF_000001405.24_GRCh37.p12_assembly_report.txt \
    | dos2unix \
    | awk 'BEGIN{FS="\t";OFS=","}($10!="na"){print $10,$7}' \
    > chr_alias.csv

> **Comments:**
> **username_4**: I didn't know about "SAF" format. I use gff with FeatureCounts. For the record, according to https://www.rdocumentation.org/packages/Rsubread/versions/1.22.2/topics/featureCounts: "The SAF annotation format has five required columns, including GeneID, Chr, Start, End and Strand. These columns can be in any order".  

---

