hi,nservant:
i met an error when running mergeSAM.py as follows:
/share/nas1/xiazb/02.soft/conda/conda3/envs/hicpro/bin/python /share/nas1/xiazb/02.soft/HiC-Pro/HiC-Pro_3.1.0/scripts/mergeSAM.py -q 10 -t -v -f bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam -r bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam -o bowtie_results/bwt2/rename/BM089_BM089.bwt2pairs.bam
[E::idx_find_and_load] Could not retrieve index file for 'bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam'
[E::idx_find_and_load] Could not retrieve index file for 'bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam'
hi,nservant: i met an error when running mergeSAM.py as follows: /share/nas1/xiazb/02.soft/conda/conda3/envs/hicpro/bin/python /share/nas1/xiazb/02.soft/HiC-Pro/HiC-Pro_3.1.0/scripts/mergeSAM.py -q 10 -t -v -f bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam -r bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam -o bowtie_results/bwt2/rename/BM089_BM089.bwt2pairs.bam [E::idx_find_and_load] Could not retrieve index file for 'bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam' [E::idx_find_and_load] Could not retrieve index file for 'bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam'
mergeBAM.py
forward= bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam
reverse= bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam
output= bowtie_results/bwt2/rename/BM089_BM089.bwt2pairs.bam
min mapq= 10
report_single= False
report_multi= False
verbose= True
Merging forward and reverse tags ...
Forward and reverse reads not paired. Check that BAM files have the same read names and are sorted.
the BM089_R1_BM089.bwt2merged.bam was sorted successly :
/share/nas1/xiazb/02.soft/cactus-bin-v2.5.0/bin/samtools sort -@ 10 -m 1000M -n -T tmp/BM089_R1_BM089 -o bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.sorted.bam bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam /share/nas1/xiazb/02.soft/cactus-bin-v2.5.0/bin/samtools sort -@ 10 -m 1000M -n -T tmp/BM089_R2_BM089 -o bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.sorted.bam bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam [bam_sort_core] merging from 160 files and 10 in-memory blocks... [bam_sort_core] merging from 160 files and 10 in-memory blocks... mv bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.sorted.bam bowtie_results/bwt2/rename/BM089_R1_BM089.bwt2merged.bam mv bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.sorted.bam bowtie_results/bwt2/rename/BM089_R2_BM089.bwt2merged.bam
when checking the command samtools sort -n , it shows than sorting by read name is not compatible with samtools index command
how to index bam files after sorting by reads name , sence mergeSAM.py requires an index file ?