Question: convert FASTA into FASTQ using linux
0
gravatar for rhoney45
4.0 years ago by
rhoney450
United Kingdom
rhoney450 wrote:

Hiiii....If anyone can please helo me how to convert fasta files into fastq using ubuntu....i shall be very thank ful....

sequence • 15k views
ADD COMMENTlink modified 4.0 years ago by Manvendra Singh2.0k • written 4.0 years ago by rhoney450
4
gravatar for Manvendra Singh
4.0 years ago by
Manvendra Singh2.0k
Berlin, Germany
Manvendra Singh2.0k wrote:

there is a perl script  here

http://code.google.com/p/fasta-to-fastq/

 

usage is

perl fasta_to_fastq.pl reads.fasta > my_converted_fasta.fq

 

ADD COMMENTlink written 4.0 years ago by Manvendra Singh2.0k

Note: This assumes a qual score of 40. Nice tool though!

ADD REPLYlink written 4.0 years ago by RamRS18k

very nice script, Thank you so much! It also works on Mac!

ADD REPLYlink modified 16 months ago • written 16 months ago by yeningrong00

please, the qual string length is one base longer than the sequence length. Could you advise how to solve it?

ADD REPLYlink modified 13 months ago • written 13 months ago by hpatzenhauerova0

Paste your sequence and qual strings here - maybe that will help figure out what's happening.

ADD REPLYlink written 13 months ago by RamRS18k
3
gravatar for RamRS
4.0 years ago by
RamRS18k
Houston, TX
RamRS18k wrote:

Hi,

FASTQ has more information content than FASTA. The conversion would require that you add some kind of quality scores, most probably some dummy values.

What would really enable us help you better is knowing the purpose behind your quest.

ADD COMMENTlink written 4.0 years ago by RamRS18k
0
gravatar for Istvan Albert
4.0 years ago by
Istvan Albert ♦♦ 77k
University Park, USA
Istvan Albert ♦♦ 77k wrote:

The simplest and fastest is to use seqtk:

seqtk seq -A input.fq > output.fa
ADD COMMENTlink written 4.0 years ago by Istvan Albert ♦♦ 77k

OP is thinking FASTA to FASTQ. Is that even possible?

ADD REPLYlink written 4.0 years ago by RamRS18k
3

whoops misread that since it is a  strange usecase

one can make up quality scores - and it is possible that some tools insist on fastq even though they would not make use of the quality information.

ADD REPLYlink modified 4.0 years ago • written 4.0 years ago by Istvan Albert ♦♦ 77k

such as k-mer-izers?

ADD REPLYlink written 4.0 years ago by RamRS18k

You can convert but... without quality score?

ADD REPLYlink written 4.0 years ago by iraun3.4k

MTE. Which is why I was wondering why OP wants to do this exactly. No tools that *needs* a FASTQ file will make do with a FASTA file's info content.

ADD REPLYlink written 4.0 years ago by RamRS18k

Yep. Now I'm curious about why the OP wants to do this conversion.. let's wait.

ADD REPLYlink written 4.0 years ago by iraun3.4k

you can always filter out the reads with low quality score from fastq file and then convert to fasta

ADD REPLYlink written 4.0 years ago by Manvendra Singh2.0k

I'm sorry, what?

ADD REPLYlink written 4.0 years ago by RamRS18k

I think i conveyed some other impression from my comment. I meant that the reads which are not of good quality , e.g. reads containing mostly NNNNNNN , can be removed from fastq and then to be converted to fasta.

is it rite?

 

ADD REPLYlink written 4.0 years ago by Manvendra Singh2.0k
1

We are talking about the conversion from fasta to fastq, I think you've misunderstood the question.

ADD REPLYlink modified 4.0 years ago • written 4.0 years ago by iraun3.4k

Yes, Indeed.

ADD REPLYlink written 4.0 years ago by Manvendra Singh2.0k

Does this work for fasta to fastq? since you wrote fastq > fasta

ADD REPLYlink written 5 months ago by jaqx00840

No it won't. But you can see my answer in this thread: A: Convert from fasta to fastq

Remember that the Q scores are fake and you set the value.

ADD REPLYlink modified 5 months ago • written 5 months ago by genomax57k

Ok, It worked, but I am trying to make a sam file from it and im getting a zero file out put with this error. Segmentation fault: 11 could you help?

ADD REPLYlink written 5 months ago by jaqx00840

Please open a separate question for this issue.

I am trying to make a sam file from it

You will need to add a lot more details here.

ADD REPLYlink written 5 months ago by WouterDeCoster32k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2147 users visited in the last hour