Skip to content
Snippets Groups Projects
Commit 3a28f5f8 authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

update typo bamqc.sh

parent 79dc4690
No related merge requests found
......@@ -18,6 +18,7 @@ def get_args():
return args
# set the tag names - take a look at SAM spec to pick an appropriate one
args = get_args()
infile = pysam.AlignmentFile(args.sam, "r")
out = pysam.AlignmentFile(args.out, "wb", template=infile)
......@@ -25,5 +26,6 @@ for read in infile.fetch():
read.set_tag('RX', read.qname.split(":")[-1])
out.write(read)
infile.close()
out.close()
......@@ -46,7 +46,6 @@ if [[ $nuctype == 'dna' ]]; then
module load bedtools/2.26.0 picard/2.10.3
samtools view -@ $SLURM_CPUS_ON_NODE -b -L ${bed} -o ${pair_id}.ontarget.bam ${sbam}
samtools index -@ $SLURM_CPUS_ON_NODE ${pair_id}.ontarget.bam
#samtools flagstat ${pair_id}.ontarget.bam > ${pair_id}.ontarget.flagstat.txt
java -Xmx64g -jar $PICARD/picard.jar CollectInsertSizeMetrics INPUT=${sbam} HISTOGRAM_FILE=${pair_id}.hist.ps REFERENCE_SEQUENCE=${index_path}/genome.fa OUTPUT=${pair_id}.hist.txt
java -Xmx64g -jar $PICARD/picard.jar CollectAlignmentSummaryMetrics R=${index_path}/genome.fa I=${pair_id}.ontarget.bam OUTPUT=${pair_id}.alignmentsummarymetrics.txt
java -Xmx64g -jar $PICARD/picard.jar EstimateLibraryComplexity I=${sbam} OUTPUT=${pair_id}.libcomplex.txt
......@@ -55,4 +54,4 @@ if [[ $nuctype == 'dna' ]]; then
grep ^all ${pair_id}.covhist.txt > ${pair_id}.genomecov.txt
samtools view -@ $SLURM_CPUS_ON_NODE ${sbam} | awk '{sum+=$5} END { print "Mean MAPQ =",sum/NR}' > ${pair_id}.meanmap.txt
perl $baseDir/calculate_depthcov.pl ${pair_id}.covhist.txt
fi
fi
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment