Answers.Body: <p>Perhaps,removing introns (if it is a higher eukaryote)</p>
  
  <pre><code>extractfeat tembl:x65921 -type CDS -join 
  </code></pre>
  
  <p>It is difficult to know without knowing the gene. </p>
  
  <p>BTW NCBI's Entrez "efetch" will do essentially the same thing, but its more complicated</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-23T16:22:12.747Z
Answers.Text: I tried that syntax with the -join at the end which didn't work either
  
  If it matters, I am currently testing it on a Histone H1 gene of C. elegans
  I'd prefer If I could get the CDS by processing the sequence file in my bash script. Since I'm using efetch to download the sequence anyway, I don't mind trying that out if it's not too complicated.
Answers.UserDisplayName: KA97
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-23T19:45:29.080Z
Answers.Text: Okay, the syntax you are using is correct, but you don't need to specify the output file
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-24T16:06:42.373Z
Answers.Text: I managed to fix it. I was accidentally using FASTA format files instead of Genbank flat file format which seemed to be the problem.
Answers.UserDisplayName: KA97
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-24T16:46:32.693Z
Answers.Text: That's good: fasta format has no features for extractfeat to extract, so it would have no chance. The error trapping in the code is clearly absent and it might be worth reporting the bug to the Emboss team.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-23T12:59:26.487Z
Answers.LastActivityDate: 2019-06-23T16:07:47.540Z
Answers.LastEditDate: 2019-06-23T16:07:47.540Z
Answers.UserDisplayName: M__
Body: <p>I am working on a script on bash linux to get the CDS (coding sequence) of a gene using extractfeat by EMBOSS. It gives me the error: Warning: No sequences written to output file</p>
  
  <p>I am unsure if my syntax is right, but this is what I have: </p>
  
  <pre><code>extractfeat inputFile outputFile -type CDS
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-22T18:41:00.917Z
Comments.Text: Hi, KA97, what is the error? If you can include it, this will help establish what the problem is.
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-23T09:54:07.873Z
Comments.Text: . The error is :   Warning: No sequences written to output file 
      It produces a blank output file with no sequence in.
Comments.UserDisplayName: KA97
Tags: <sequence-analysis><bash><emboss>
Title: How to use extractfeat?
ThreadText: # How to use extractfeat?
  
  (Asked by: username_0 on 2019-06-22)
  
  I am working on a script on bash linux to get the CDS (coding sequence) of a gene using extractfeat by EMBOSS. It gives me the error: Warning: No sequences written to output file
  
  I am unsure if my syntax is right, but this is what I have:
  
  ```
  extractfeat inputFile outputFile -type CDS
  
  ```
  
  **Tags:** sequence-analysis, bash, emboss
  
  > **Comments:**
  > **username_1**: Hi, username_0, what is the error? If you can include it, this will help establish what the problem is.  
  > **username_0**: . The error is :   Warning: No sequences written to output file      It produces a blank output file with no sequence in.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-06-23. Score: 0
  
  Perhaps,removing introns (if it is a higher eukaryote)
  
  ```
  extractfeat tembl:x65921 -type CDS -join 
  
  ```
  
  It is difficult to know without knowing the gene.
  
  BTW NCBI's Entrez "efetch" will do essentially the same thing, but its more complicated
  
  > **Comments:**
  > **username_0**: I tried that syntax with the -join at the end which didn't work either  If it matters, I am currently testing it on a Histone H1 gene of C. elegans I'd prefer If I could get the CDS by processing the sequence file in my bash script. Since I'm using efetch to download the sequence anyway, I don't mind trying that out if it's not too complicated.  
  > **username_1**: Okay, the syntax you are using is correct, but you don't need to specify the output file  
  > **username_0**: I managed to fix it. I was accidentally using FASTA format files instead of Genbank flat file format which seemed to be the problem.  
  > **username_1**: That's good: fasta format has no features for extractfeat to extract, so it would have no chance. The error trapping in the code is clearly absent and it might be worth reporting the bug to the Emboss team.  
  
  ---
  
  