Changes between Version 51 and Version 52 of SOPs/miningSAMBAM
- Timestamp:
- 08/08/24 11:50:35 (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SOPs/miningSAMBAM
v51 v52 44 44 /nfs/BaRC_Public/BaRC_code/Perl/SAM_to_BAM_sort_index/SAM_to_BAM_sort_index.pl 45 45 # Or on a folder of SAM files 46 for samFile in `/bin/ls *.sam`; do bsub /nfs/BaRC_Public/BaRC_code/Perl/SAM_to_BAM_sort_index/SAM_to_BAM_sort_index.pl $samFile; done46 for samFile in `/bin/ls *.sam`; do sbatch --partition=20 --job-name=sam2bam --mem=32G --wrap "/nfs/BaRC_Public/BaRC_code/Perl/SAM_to_BAM_sort_index/SAM_to_BAM_sort_index.pl $samFile " ; done 47 47 }}} 48 48 … … 167 167 Tophat/bowtie mappers create the tag NH:i:XXX where XXX is the number of times the read has mapped. 168 168 {{{ 169 bsub"samtools view accepted_hits.bam | grep -v NH:i:1 | perl -pe 's/AS.+(NH:i:\d+)/\$1/' | cut -f1,10,12 | perl -pe 's/NH:i://' | sort -u -k3,3nr > Multi-mapped.sorted.txt"169 sbatch --partition=20 --job-name=samtools --mem=32G --wrap "samtools view accepted_hits.bam | grep -v NH:i:1 | perl -pe 's/AS.+(NH:i:\d+)/\$1/' | cut -f1,10,12 | perl -pe 's/NH:i://' | sort -u -k3,3nr > Multi-mapped.sorted.txt" 170 170 # Output format: 171 171 # read_ID<tab>read<tab>number times mapped … … 186 186 # accepted_hits_posStrand.bam: mapped to positive strand 187 187 188 bsub"samtools view -f 16 -b accepted_hits.bam >| accepted_hits_negStrand.bam"189 bsub"samtools view -F 16 -b accepted_hits.bam >| accepted_hits_posStrand.bam"188 sbatch --partition=20 --job-name=samtools --mem=32G --wrap "samtools view -f 16 -b accepted_hits.bam >| accepted_hits_negStrand.bam" 189 sbatch --partition=20 --job-name=samtools --mem=32G --wrap "samtools view -F 16 -b accepted_hits.bam >| accepted_hits_posStrand.bam" 190 190 191 191 }}} … … 196 196 # output: 1st pair: accepted_hits_1stPair.bam 197 197 # 2nd pair: accepted_hits_2ndPair.bam 198 bsub"samtools view -b -f 0x0040 accepted_hits.bam > accepted_hits_1stPair.bam"199 bsub"samtools view -b -F 0x0040 accepted_hits.bam > accepted_hits_2ndPair.bam"198 sbatch --partition=20 --job-name=samtools --mem=32G --wrap "samtools view -b -f 0x0040 accepted_hits.bam > accepted_hits_1stPair.bam" 199 sbatch --partition=20 --job-name=samtools --mem=32G --wrap "samtools view -b -F 0x0040 accepted_hits.bam > accepted_hits_2ndPair.bam" 200 200 }}} 201 201 … … 243 243 qualimap bamqc -bam Mapped_DNA_reads.bam -outdir qualimap_output -outformat PDF:HTML 244 244 # Command-line execution may require disabling X-windows 245 bsub"unset DISPLAY; qualimap bamqc -bam Mapped_DNA_reads.bam -outdir qualimap_output -outformat PDF:HTML"245 sbatch --partition=20 --job-name=bamqc --mem=32G --wrap "unset DISPLAY; qualimap bamqc -bam Mapped_DNA_reads.bam -outdir qualimap_output -outformat PDF:HTML" 246 246 }}} 247 247