Question: (Closed) Converting Consensus Fastq To Fasta
0
gravatar for Love
7.4 years ago by
Love100
Love100 wrote:

Possible Duplicate:
How to generate a consensus fasta sequence from SAM tools pileup?

How common are multi-line fastq files?

I was trying to convert a fastq consensus sequnece (generated by the mpileup samtools) to a fasta file. However the original FASTQ lines are wrapped. Most of fastq parsers do not work with multi-line fastq files. They only work for 4 lines standard fastq format. Is there a perl script or C# or Java tools to deal with this issue? Please don't use Python, I am not strong on it and I don't want to be an expert on many programming languages during a short time. Of cource, if python is realy powerful, it is considerable.:)

Also if we can get the corresponding quality score for each of the entries, it will be great.

Thanks.

fasta perl fastq • 3.1k views
ADD COMMENTlink modified 7.4 years ago by Swbarnes21.4k • written 7.4 years ago by Love100
1
gravatar for Swbarnes2
7.4 years ago by
Swbarnes21.4k
Swbarnes21.4k wrote:

It's not too hard to alter the samtools.pl program itself to make fastas instead of fastqs. perl programs are just ordinary text. You want to find the place where it prints out "@" and sequence, and change the "@" to a ">", and you want to comment out the lines where it prints out the "+", newline, and the quality string, by putting "#" in front of those lines.

That's what I did. I don't have access to it here, but I can pull it up tomorrow. Poke around here or seqanswers for the last time I told someone how to fix the perl script to do that.

Or, you could do it with a short perl script, or maybe a line of sed.

ADD COMMENTlink written 7.4 years ago by Swbarnes21.4k
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

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