Entering edit mode
17 months ago
وفاء
•
0
Hi All,
Using this command line, I converted two Paired bam files:
samtools fastq -1 ${sampleID}.sorted_1.fastq -2 ${sampleID}.sorted_2.fastq ${sampleID}.sorted.bam
1st File: Bam 8.4G Fastq1 8.1G and fastq2 8.1G were produced.
Fastq1 494M and fastq2 494M were made by Bam 1.8G.
Then I use the nf-core nextflow RNA seq pipeline in the cluster, which results in the following error:
Error: r2-scr unexpectedly ended before r1-src
caused by:
unexpected end of file.
Q1: Is the fastq's size appropriate?
Q2: What is the appropriate size for fastq derived from bam?
Q3: How can I fix the problem?
Did you name sort (or
samtools collate
) your BAM file before converting to fastq. This is required.File sizes is a poor metric for any analysis except if they are empty or not (other than to determine that some result was produced). That said the files in your case appear to be corrupt and may need to be regenerated.
I started by sorting the bam with this command: samtools sort ${sampleID}.bam -o ${sampleID}.sorted.bam
You need to
samtools sort -n ${sampleID}.bam -o ${sampleID}.sorted.bam
. This brings paired-end reads next to each other in the sorted BAM file.