This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Qualimap Failed to run bamqc

Hello i tried to run qualimap bamcq on my bam file that i obtain from mapping my reads against the contigs using bowtie2 but it didn't work .

J

ava memory size is set to 1200M
Launching application...

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
QualiMap v.2.2.1
Built on 2016-10-03 18:14

Selected tool: bamqc
Available memory (Mb): 32
Max memory (Mb): 1118
Starting bam qc....
Loading sam header...
Wed Apr 15 18:43:06 CEST 2020       WARNING According to header the BAM file is not sorted by coordinate!
Loading locator...
Loading reference...
Number of windows: 400, effective number of windows: 3114
Chunk of reads size: 1000
Number of threads: 48
Processed 311 out of 3114 windows...
Processed 622 out of 3114 windows...
Processed 933 out of 3114 windows...
Processed 1244 out of 3114 windows...
Processed 1555 out of 3114 windows...
Failed to run bamqc
java.lang.RuntimeException: The alignment file is unsorted.
Please sort the BAM file by coordinate.
    at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:372)
    at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:242)
    at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:190)
    at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:111)

Wed Apr 15 18:43:06 CEST 2020       WARNING Cleanup output dir

i don't know what went wrong . please HELP .

Thank you

assembly alignment software error r

1 answer

Error is noted in log above:

java.lang.RuntimeException: The alignment file is unsorted.
Please **sort the BAM file by coordinate**.

how to sort the BAM file by coordinate , i used bowtie for mapping then i used samtools ?? bowtie2 --threads 10 --very-sensitive-local -I 0 -X 200 -x DATABASE -1 R_1.fq.gz -2 R_2.fq.gz -S Results.sam then samtools view -b -h Results.sam > Results.bam

samtools sort -o sorted.bam original.bam

Log in to answer this question.