https://github.com/arjunrajlaboratory/RajLabSeqTools
Tip revision: c5b88eb5aa3fa9f6a657d8b078405ce82f7e0e2d authored by Eric Sanford on 09 October 2019, 20:53:45 UTC
Updated STAR version, set default reference genome to hg38, added gene_names from gtf file when there is no HGNC symbol match, made it easier to change the reference genome by defining it in the setEnvironmentVariables.sh script. Modified some snakemake files to make that alternate pipeline almost runnable on the cluster in an interactive node.
Updated STAR version, set default reference genome to hg38, added gene_names from gtf file when there is no HGNC symbol match, made it easier to change the reference genome by defining it in the setEnvironmentVariables.sh script. Modified some snakemake files to make that alternate pipeline almost runnable on the cluster in an interactive node.
Tip revision: c5b88eb
allGenerateCounts.sh
#!/bin/bash
# run from within "repo" directory
EXPERIMENT=$1
codeHomeDir=$2
PROJECT=$3
gtfFile=$4
ALIGNMENT_TOOL_NAME=star
allSamplePaths=( ${EXPERIMENT}/analyzed/* )
thisSampleNumber=$((LSB_JOBINDEX-1))
thisSamplePath=${allSamplePaths[$thisSampleNumber]}
sampleID=`basename "$thisSamplePath"`
# This section takes the sam files and converts them to sorted bam.
echo "Starting ..."
fullCmd="$codeHomeDir/rajlabseqtools/Utilities/stepThreeGenerateCounts/samToSortedBam.sh \
$EXPERIMENT $sampleID star"
echo "$fullCmd"
eval "$fullCmd"
echo "Done ..."
# This runs the bamutils portion of the process
echo "Starting ..."
fullCmd="$codeHomeDir/rajlabseqtools/Utilities/stepThreeGenerateCounts/keepSTARUniquelyMappedBam.sh \
$EXPERIMENT $sampleID star"
echo "$fullCmd"
eval "$fullCmd"
echo "Done ..."
# This is everything in HTseq array steps
echo "... Preparing Sam for HTSeq"
fullCmd="$codeHomeDir/rajlabseqtools/Utilities/stepThreeGenerateCounts/prepareSamForHTSeq.sh $EXPERIMENT $sampleID $ALIGNMENT_TOOL_NAME"
eval "$fullCmd"
echo "... running HTSeq"
fullCmd="$codeHomeDir/rajlabseqtools/Utilities/stepThreeGenerateCounts/runHTSeq.sh $EXPERIMENT $sampleID $gtfFile"
eval "$fullCmd"
echo "... removing temporary Sams/bams prepared for HTSeq"
fullCmd="$codeHomeDir/rajlabseqtools/Utilities/stepThreeGenerateCounts/teardownSamForHTSeq.sh $EXPERIMENT $sampleID"
eval "$fullCmd"
echo "...generating melted data"
fullCmd="$codeHomeDir/rajlabseqtools/Utilities/stepThreeGenerateCounts/meltHTSeqData.pl $EXPERIMENT/analyzed/*/htseq/*.htseq.stdout > /project/arjunrajlab/$PROJECT/repo/$EXPERIMENT/meltedData.tsv"
