I have a paired-ends RNA-seq fastq reads and it is too large.
I'd like to create a subset of reads only containing the reads mapping to chrX.
Firstly, I need to map all the reads to chrX.
Then how can I select the mapped reads?
Thanks a lot~~
I have a paired-ends RNA-seq fastq reads and it is too large.
I'd like to create a subset of reads only containing the reads mapping to chrX.
Firstly, I need to map all the reads to chrX.
Then how can I select the mapped reads?
Thanks a lot~~
1) You could map using tophat or bwa.
2) Then extract the mapped reads using samtools. See here - How To Filter Mapped Reads With Samtools
Best
For splitting FASTQ per chromosme : Split Fastq File Into Different Files Only Comprising One Chromosome Each
For splitting BAM per chromosome,something like : samtools view -b chr1:100-200 > small.bam
This is a latest thread on this: A: Converting large (compressed and unsorted) BAM files to fastq
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Just as a remark, it's not the best solution to map all your reads only to chrX. As such reads which map "suboptimally" to chrX but better to e.g. chr6 might still get mapped to chrX. An aligner doesn't necessarily find the correct position of a read, just the one best matching.