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

update umi support rnaseqalign

parent 240f711b
Branches
Tags
No related merge requests found
...@@ -34,7 +34,7 @@ if [[ -z $pair_id ]] || [[ -z $fq1 ]]; then ...@@ -34,7 +34,7 @@ if [[ -z $pair_id ]] || [[ -z $fq1 ]]; then
fi fi
source /etc/profile.d/modules.sh source /etc/profile.d/modules.sh
module load samtools/gcc/1.6 picard/2.10.3 module load samtools/1.6 picard/2.10.3
baseDir="`dirname \"$0\"`" baseDir="`dirname \"$0\"`"
if [[ -z $SLURM_CPUS_ON_NODE ]] if [[ -z $SLURM_CPUS_ON_NODE ]]
then then
...@@ -59,13 +59,14 @@ else ...@@ -59,13 +59,14 @@ else
else else
hisat2 -p $SLURM_CPUS_ON_NODE --rg-id ${pair_id} --rg LB:tx --rg PL:illumina --rg PU:barcode --rg SM:${pair_id} --add-chrname --no-unal --dta -x ${index_path}/hisat_index/genome -1 $fq1 -2 $fq2 -S out.sam --summary-file ${pair_id}.alignerout.txt hisat2 -p $SLURM_CPUS_ON_NODE --rg-id ${pair_id} --rg LB:tx --rg PL:illumina --rg PU:barcode --rg SM:${pair_id} --add-chrname --no-unal --dta -x ${index_path}/hisat_index/genome -1 $fq1 -2 $fq2 -S out.sam --summary-file ${pair_id}.alignerout.txt
fi fi
samtools view -1 --threads $SLURM_CPUS_ON_NODE -o output.bam out.sam if [[ $umi==1 ]]
fi then
if [[ $umi==1 ]] python ${baseDir}/add_umi_sam.py -s out.sam -o output.bam
then else
python ${baseDir}/add_umi_bam.py -b output.bam -o output.unsort2.bam samtools view -1 --threads $SLURM_CPUS_ON_NODE -o output.bam out.sam
mv output.unsort2.bam output.bam fi
fi fi
samtools sort -@ $SLURM_CPUS_ON_NODE -O BAM -n -o output.nsort.bam output.bam samtools sort -@ $SLURM_CPUS_ON_NODE -O BAM -n -o output.nsort.bam output.bam
java -jar $PICARD/picard.jar FixMateInformation ASSUME_SORTED=TRUE SORT_ORDER=coordinate ADD_MATE_CIGAR=TRUE I=output.nsort.bam O=${pair_id}.bam java -jar $PICARD/picard.jar FixMateInformation ASSUME_SORTED=TRUE SORT_ORDER=coordinate ADD_MATE_CIGAR=TRUE I=output.nsort.bam O=${pair_id}.bam
samtools index -@ $SLURM_CPUS_ON_NODE ${pair_id}.bam samtools index -@ $SLURM_CPUS_ON_NODE ${pair_id}.bam
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