Question: convert FASTA into FASTQ using linux
0
gravatar for rhoney45
3.6 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 • 13k views
ADD COMMENTlink modified 3.6 years ago by Manvendra Singh2.0k • written 3.6 years ago by rhoney450
4
gravatar for Manvendra Singh
3.6 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 3.6 years ago by Manvendra Singh2.0k

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

ADD REPLYlink written 3.6 years ago by Ram15k

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

ADD REPLYlink modified 11 months ago • written 11 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 8 months ago • written 8 months ago by hpatzenhauerova0

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

ADD REPLYlink written 8 months ago by Ram15k
3
gravatar for Ram
3.6 years ago by
Ram15k
New York
Ram15k 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 3.6 years ago by Ram15k
0
gravatar for Istvan Albert
3.6 years ago by
Istvan Albert ♦♦ 76k
University Park, USA
Istvan Albert ♦♦ 76k wrote:

The simplest and fastest is to use seqtk:

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

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

ADD REPLYlink written 3.6 years ago by Ram15k
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 3.6 years ago • written 3.6 years ago by Istvan Albert ♦♦ 76k

such as k-mer-izers?

ADD REPLYlink written 3.6 years ago by Ram15k

You can convert but... without quality score?

ADD REPLYlink written 3.6 years ago by iraun3.3k

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 3.6 years ago by Ram15k

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

ADD REPLYlink written 3.6 years ago by iraun3.3k

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

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

I'm sorry, what?

ADD REPLYlink written 3.6 years ago by Ram15k

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 3.6 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 3.6 years ago • written 3.6 years ago by iraun3.3k

Yes, Indeed.

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

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

ADD REPLYlink written 6 days ago by jaqx00830

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 6 days ago • written 6 days ago by genomax47k

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 6 days ago by jaqx00830

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 6 days ago by WouterDeCoster28k
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: 873 users visited in the last hour