This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sub sampling from pyrosequencing reads

I have a pyrosequencing reads from almost 200 samples, obviously in one .fna file. I want to do subsampling from there in a way to have equal no. of sequence (randomly) from each sample. Does any one know any script/ programme to do that.

next-gen

1 answer

This Biostar post should be useful to you.

Thanks Prakki Rama, But I was also wondering that, does this give me the equal no of sequences from each sample ?

Yes. It generated random number of sequences equally in all my files. I ran the following to get multiple files in shell.

for((n=1; n<=10; n=n+1)); do sh subsample_se_fasta.sh sample.Seq.fa s_sub_"$n".fasta 10; done

Thanks for your quick response.

Actually I have .fna file and I want to subsample it before picking OTU from there.

Log in to answer this question.