+ '[' '!' -f /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam ']'
+ sam=.sam
+ samFile=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.sam
+ sed 's/^chr//'
+ /gsc/software/linux-x86_64/samtools-0.1.7a//samtools view /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam
+ awk -F '\t' 'and(1024,$2)==0 && and(512, $2)==0 {print $3,$4,$4+49,$0}'
+ star=Star
+ noStar=NoStar
+ samStar=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samStar
+ samNoStar=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStar
+ grep '^*' /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.sam
+ grep -v '^*' /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.sam
+ gene=Gene
+ geneFile=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGene
+ /home/rcorbett/lymphoma/tools/overlapcoordinates_ultrafast.pl -ref /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStar -coord /projects/NBL/reference_files/all.genes.clean.txt -all no_gene
+ yes=Yes
+ no=No
+ geneYes=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGeneYes
+ geneNo=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGeneNo
+ grep no_gene /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGene
+ grep -v no_gene /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGene
+ exons=_exons
+ exonFile=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGeneYes_exons
+ /home/rcorbett/lymphoma/tools/overlapcoordinates_ultrafast.pl -ref /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGeneYes -coord /projects/NBL/reference_files/all.exons.clean.txt
+ tmpSpace=/projects/bioSCRATCH/rcorbett/
+ keepers=keepers.txt
+ counts=counts.txt
+ outs=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt
+ outCounts=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samcounts.txt
+ sort +0 -1 -T /projects/bioSCRATCH/rcorbett/
+ cat /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGeneYes_exons /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samNoStarGeneNo /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samStar
+ sed 's/^[^S]*S/S/'
+ awk '{ print $2,$1}'
+ cat /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt
+ awk '{ print $1}'
+ uniq -c
+ sed 's/^ *//g'
+ /home/rcorbett/slx_service_rc/trunk/sam2fastq.py -b /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam
+ join /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samcounts.txt
+ bam=.bam
+ keepSam=/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt.sam
+ keepBam-/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt.bam
/home/rcorbett/slx_service_rc/trunk/getAssemblyReads.sh: line 56: keepBam-/projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt.bam: No such file or directory
+ awk -F '\t' '{if ($3=="M") {gsub("M","MT",$3); OFS = "\t"; print $0} else { print $0}}'
+ cat /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt
+ sed 's/ \^.*//'
+ /gsc/software/linux-x86_64/samtools-0.1.7a/samtools import /home/pubseq/genomes/9606/hg18/bwa_ind/genome/human.fasta.fai /projects/NBL/HS1795/HS1795.merged_withJunctionsOnGenome.bam.samkeepers.txt.sam
Usage: bamtk import <in.ref_list> <in.sam> <out.bam>
