https://github.com/arjunrajlaboratory/RajLabSeqTools
Raw File
Tip revision: c8b8c79b2ec9c1bd9eb7ced427bb2aec25f19506 authored by Benjamin Emert on 26 March 2020, 17:37:11 UTC
Updated reorganizeBasespaceFiles.py to better parse samples with same first index (e.g. sample 1 and sample10)
Tip revision: c8b8c79
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"
back to top