<p><em>Answer from @ATpoint, converted from comment:</em></p>
<p>Check whether chromosome identifiers are the same and both files contain the same chromosomes. You can also check that the end coordinate of the GTF never exceeds the length of the respective chromosome. Maybe you can also check whether the first three nucleotides of every CDS indeed start with a start codon. If this is all true then I guess I would trust this pair.</p>

CC BY-SA 4.0
2021-08-11T12:47:23.113Z
2021-08-11T12:47:23.113Z
gringer
<p>You might use <code>agat_sq_filter_feature_from_fasta.pl</code> from <a href="https://github.com/NBISweden/AGAT" rel="nofollow noreferrer">AGAT</a></p>
<pre><code> DESCRIPTION 
 This script is a kind of annotation filter by sequence name. It goes through the gff annotation features and remove those
 that are not linked to a sequence from the fasta file provided. The
 match between sequence name in the fasta file and the 1st column of
 the gff3 file is case sensitive.
</code></pre>

CC BY-SA 4.0
2021-08-12T14:53:00.147Z
2021-08-12T14:53:00.147Z
juke34
<p>I'd like to know if there is a simple way to check the concordance between a GTF file and a fasta file (that I use as mapping reference) ?</p>
<p>It may be a dumb question, but I suspect discrepancies between my 2 files and I don't want to check this manually</p>

CC BY-SA 4.0
2021-08-11T12:49:58.977Z
Answer to this specific question --> turn back to the person who provided me the GTF and complain ! :P
elielink
<fasta><gtf>
How to check if a fasta file and a GTF file fit and form a valid pair?
# How to check if a fasta file and a GTF file fit and form a valid pair?

(Asked by: username_0 on 2021-08-11)

I'd like to know if there is a simple way to check the concordance between a GTF file and a fasta file (that I use as mapping reference) ?

It may be a dumb question, but I suspect discrepancies between my 2 files and I don't want to check this manually

**Tags:** fasta, gtf
> **Comments:**
> **username_0**: Answer to this specific question --> turn back to the person who provided me the GTF and complain ! :P  

---

## 2 answers

### Answer by username_1 on 2021-08-11. Score: 1 | Accepted answer

*Answer from @ATpoint, converted from comment:*

Check whether chromosome identifiers are the same and both files contain the same chromosomes. You can also check that the end coordinate of the GTF never exceeds the length of the respective chromosome. Maybe you can also check whether the first three nucleotides of every CDS indeed start with a start codon. If this is all true then I guess I would trust this pair.


---

### Answer by username_2 on 2021-08-12. Score: 0

You might use agat_sq_filter_feature_from_fasta.pl from AGAT
 DESCRIPTION 
 This script is a kind of annotation filter by sequence name. It goes through the gff annotation features and remove those
 that are not linked to a sequence from the fasta file provided. The
 match between sequence name in the fasta file and the 1st column of
 the gff3 file is case sensitive.


---

