BenCUTA
BenCUTA

Reputation: 11

.cat.fastq to .cat.fasta file conversion problems

I'm trying to convert fastq to fasta without doing a quality filter first. When I try to use fastx toolkit to run this conversion, it gives me an error message when it runs into a low quality base and terminates the conversion so that my converted output ends very early. (error says something like quality score below -30).

I then tried to use a sed solution posted earlier on this forum about how to convert to fasta using sed. The line was this:

sed -n '1~4s/^@/>/p;2~4p'

the line I input to the terminal was:

sed -n '1~4s/^@/>/p;2~4p' Sample_As_L001_R1.cat.fastq 

It spit out what I wanted, but printed directly into the terminal.

How do I get this info to not print on the terminal, but to print to an output file?

How do I specify the file/file name that I want the output to go into. Thanks.

Upvotes: 0

Views: 163

Answers (1)

cfrick
cfrick

Reputation: 37033

redirect it to a file

sed -n '1~4s/^@/>/p;2~4p' Sample_As_L001_R1.cat.fastq > Sample_As_L001_R1.cat.fasta

Upvotes: 1

Related Questions