Question: Splitting Individual FASTA/FASTQ reads from NGS data
0
gravatar for NGS-Newbie
21 months ago by
NGS-Newbie10
NGS-Newbie10 wrote:

Hi All

I have subsets of 100 and 500 reads in FASTA and FASTQ formats. How can I split this one FASTA/FASTQ file with 100 reads into 100 FASTA files containing one sequence read each?

Thank you all!

ADD COMMENTlink modified 21 months ago • written 21 months ago by NGS-Newbie10
1

It's very likely that what you are looking for already exists, but rolling your own code (for example in Python) would be trivial. I guess it would take me longer to search the internet for something then just write it myself. Let me know if you need help with that (but for your own good it's best if you try first on your own to get something working...)

ADD REPLYlink written 21 months ago by WouterDeCoster37k

Although similar, FASTA and FASTQ are different file formats. FASTQ contains base quality information in addition the sequence information. If you're splitting a FASTQ into many FASTA, you will be discarding sequence quality information. Is this really what you want to do?

ADD REPLYlink written 21 months ago by d-cameron2.0k
2
gravatar for genomax
21 months ago by
genomax63k
United States
genomax63k wrote:

faSplit (linux version linked/ macOS available) from Kent Utilities will take care of the fasta file split.

Instead of "sorting" you may want to change the title to "splitting".

For fastq files you could do: split -l 4 -d -a 500 your_file.fq SEQ. Use a different word instead of SEQ to use that as file name PREFIX.

ADD COMMENTlink modified 21 months ago • written 21 months ago by genomax63k

Thanks, genomax!

Which program do I need to install to run this? FaSplit?

ADD REPLYlink written 21 months ago by NGS-Newbie10
1

Nothing to install with faSplit. Download the file I linked (add execute permissions if needed) and run.

ADD REPLYlink written 21 months ago by genomax63k

Awesome! Thanks, GenoMax!

I just modified it a bit, as

split -l 2 -a 15 File.fa S1Seq

Thank you all!

ADD REPLYlink written 21 months ago by NGS-Newbie10
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: 2023 users visited in the last hour