I would like to convert my bam file to fastq. But after I run bedtools with the sorted bam file, I've got two empty files. What should be wrong? (Or what is the proper way to convert a mapped paired-end bam file to fastq?)
What I tried:
samtools sort -n /pathtothefiles/NA12878.chr1.bam /pathtothefiles/NA12878_chr1.qsort
bedtools bamtofastq -i /pathtothefiles/NA12878_chr1.qsort \ -fq aln.end1.fq \ -fq2 aln.end2.fq
Thanks in advance!