RNAFramework Job Scripts

From UFRC
Revision as of 11:57, 14 April 2022 by Johnbullard (talk | contribs) (Created page with "Return to RNAFramework main page == Job script used for testing application installation == <pre> #!/bin/bash #SBATCH --job-name=rnaframework_2.7.2_test #SBA...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Return to RNAFramework main page

Job script used for testing application installation

#!/bin/bash
#SBATCH --job-name=rnaframework_2.7.2_test
#SBATCH --mail-type=NONE
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=2gb
#SBATCH --time=24:00:00
#SBATCH --output=rnaframework_2.7.2_test.log

echo "Setting up test environment..."
TEST_PWD=/data/apps/tests/rnaframework/2.7.2
TEST_DATADIR=${TEST_PWD}/example_data
TEST_WORKDIR=${TEST_PWD}/test_output

cd ${TEST_PWD}
module load rnaframework/2.7.2

# Remove any previous test results and re-create a working directory
if [ -d ${TEST_WORKDIR} ]; then rm -rf ${TEST_WORKDIR}/; fi
mkdir ${TEST_WORKDIR}

cd ${TEST_WORKDIR}

echo "Starting test run at $(date) on $(hostname)..."

###################################
echo 'Retrieving reference index...'
rf-index \
    --prebuilt 6 \
    --bowtie2 \
    --processors ${SLURM_CPUS_ON_NODE:-1}

echo 'Map reads to reference...'
rf-map \
    --bowtie2 \
    --processors ${SLURM_CPUS_ON_NODE:-1} \
    -bnr \
    -b3 51 \
    -bm 20 \
    -bi Hsapiens_refGene_longest_bt2/reference ${TEST_DATADIR}/S1.fastq ${TEST_DATADIR}/V1.fastq

echo 'Count RT-stops in both samples...'
rf-count \
    --processors ${SLURM_CPUS_ON_NODE:-1} \
    --sorted \
    --fasta Hsapiens_refGene_longest_bt2/reference.fa \
    rf_map/*.bam

echo 'Normalize data...'
rf-norm \
    --processors ${SLURM_CPUS_ON_NODE:-1} \
    --untreated rf_count/V1.rc \
    --treated rf_count/S1.rc \
    --index rf_count/index.rci

echo 'Perform inference of secondary structures...'
rf-fold \
    --processors ${SLURM_CPUS_ON_NODE:-1} \
    -img \
    S1_vs_V1_norm
###################################

# There should be some files in the work directory
echo "There should be some results listed below:"
find ${TEST_WORKDIR}/rf_fold -type f ! -empty -ls

echo "Test complete at $(date)."