Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-11T12:47:23.113Z
Answers.LastActivityDate: 2021-08-11T12:47:23.113Z
Answers.UserDisplayName: gringer
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-12T14:53:00.147Z
Answers.LastActivityDate: 2021-08-12T14:53:00.147Z
Answers.UserDisplayName: juke34
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T12:49:58.977Z
Comments.Text: Answer to this specific question --> turn back to the person who provided me the GTF and complain ! :P
Comments.UserDisplayName: elielink
Tags: <fasta><gtf>
Title: How to check if a fasta file and a GTF file fit and form a valid pair?
ThreadText: # 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](https://github.com/NBISweden/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.
  
  ```
  
  
  ---
  
  