Question: convert FASTA into FASTQ using linux
1
gravatar for rhoney45
4.2 years ago by
rhoney4510
United Kingdom
rhoney4510 wrote:

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

sequence • 16k views
ADD COMMENTlink modified 6 weeks ago by genomax60k • written 4.2 years ago by rhoney4510
3
gravatar for genomax
6 weeks ago by
genomax60k
United States
genomax60k wrote:

For those who may happen to reach this thread by way of search in future you can convert a fasta file to fastq format using reformat.sh from BBMap suite.

Please remember that the Q-scores created here are fake (example below sets Q-scores to 35 for all bases).

reformat.sh in=test.fa out=fake.fq qfake=35

ADD COMMENTlink written 6 weeks ago by genomax60k
5
gravatar for RamRS
4.2 years ago by
RamRS20k
Houston, TX
RamRS20k 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.2 years ago by RamRS20k
5
gravatar for Manvendra Singh
4.2 years ago by
Manvendra Singh2.0k
Berlin, Germany
Manvendra Singh2.0k wrote:

There is a perl script here

Usage is

perl fasta_to_fastq.pl reads.fasta > my_converted_fasta.fq
ADD COMMENTlink modified 5 weeks ago by RamRS20k • written 4.2 years ago by Manvendra Singh2.0k

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

ADD REPLYlink written 4.2 years ago by RamRS20k

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

ADD REPLYlink modified 19 months ago • written 19 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 16 months ago • written 16 months ago by hpatzenhauerova10

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

ADD REPLYlink written 16 months ago by RamRS20k

Hi! The script works unless I use warnings; If I use it, then it gives a warning:

Use of uninitialized value $header in string ne at fasta_to_fastq.pl line 13, <FILE> line 1.

In line 13 is:

if($header ne "") {

Thank you in advance

ADD REPLYlink modified 6 weeks ago by RamRS20k • written 6 weeks ago by katerinavram0

See A: Convert from fasta to fastq for an alternative

ADD REPLYlink written 6 weeks ago by WouterDeCoster36k

You'll have to add my $header; somewhere at the top op the script (aka, declare the variable). I would also advise to add use strict; (next to use warnings)

ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by lieven.sterck3.5k
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: 548 users visited in the last hour