<p><em>Answer from @haci, converted from comment:</em></p>
<p>You should run your command within that directory (the directory where the fastq file is), this does not seem to be the case as far as I see. Alternatively you can provide the absolute path of your fastq file.</p>
<p><code>cd</code> into the directory where the fastq file is (you should be able to see your file of interest when you type <code>ls</code>) and then run the command in your question:</p>
<pre><code>cd ./genome_diirt
seqtk seq -a KF0124_1_1.fastq &gt; KF0124_1_1.fasta
</code></pre>
<p>Alternatively you can provide the absolute path of your fastq file:</p>
<pre><code>seqtk seq -a ./genome_diirt/KF0124_1_1.fastq &gt; ./genome_diirt/KF0124_1_1.fasta
</code></pre>

CC BY-SA 4.0
2021-07-23T21:47:52.403Z
2021-07-23T21:47:52.403Z
gringer
<p>I am new to bioinformatics and programming. I tried to convert my fastq files to fasta file, but got this. What could be wrong?</p>
<pre><code>(base) jszheng@Greater:~/seqtk$ seqtk seq -a KF0124_1_1.fastq &gt; KF0124_1_1.fasta
[E::stk_seq] failed to open the input file/stream.
</code></pre>

<fasta><genome><sequence-analysis><fastq><linux>
Converting Fastq files to Fasta files on Ubuntu
# Converting Fastq files to Fasta files on Ubuntu

(Asked by: username_0 on 2021-07-23)

I am new to bioinformatics and programming. I tried to convert my fastq files to fasta file, but got this. What could be wrong?
(base) jszheng@Greater:~/seqtk$ seqtk seq -a KF0124_1_1.fastq > KF0124_1_1.fasta
[E::stk_seq] failed to open the input file/stream.

**Tags:** fasta, genome, sequence-analysis, fastq, linux

---

## 1 answers

### Answer by username_1 on 2021-07-23. Score: 2

Answer from @haci, converted from comment:
You should run your command within that directory (the directory where the fastq file is), this does not seem to be the case as far as I see. Alternatively you can provide the absolute path of your fastq file.
cd into the directory where the fastq file is (you should be able to see your file of interest when you type ls) and then run the command in your question:
cd ./genome_diirt
seqtk seq -a KF0124_1_1.fastq > KF0124_1_1.fasta

Alternatively you can provide the absolute path of your fastq file:
seqtk seq -a ./genome_diirt/KF0124_1_1.fastq > ./genome_diirt/KF0124_1_1.fasta


---

