Hello everyone
I have 10X spatial transcriptome data from four samples (2 treated and 2 untreated). For 2 samples, transcriptome mapping rate is very less (< 30 %). Next I wanted to see sequence statistics of unmapped reads from bam file generated by spaceranger . I followed these steps :
1) extraction of unmapped reads
samtools view -f 4 possorted_genome.bam > possorted_genome_bam_unmapped.bam (file size 4 gb).
2) conversion of bam to fastq
bedtools bamtofastq -i possorted_genome_bam_unmapped.bam -fq unmapped_R1.fq -fq2 unmapped_R2.fq (0 bytes).
Last step gave me empty .fq files.
I would appreciate all the suggestions.
I tried to process my bam files as follows :
samtools sort -n -o possorted_genome_bam.qsort.unmapped.bam possorted_genome_bam_unmapped.bam
bedtools bamtofastq -i possorted_genome_bam_unmapped.bam -fq unmapped_R1.fq -fq2 unmapped_R2.fq
But still its giving me empty .fq files.
what is the output of
Here is the output :
all those reads are unmapped flag=4 , but anyway, those reads are SINGLE-END reads ( flag 1 = read paired is unchecked). So using -fq -fq2 is meaningless