Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
srun --pty -p interactive -t 0-02:0:0 --mem 2000MB -n 1 /bin/bash

Make alignment using: STAR through module rcbio/1.1 , bowtie2 through module rcbio/1.1 or bwa through module rcbio/1.1 

After alignment finishes, go to that folder, for example star

Code Block
cd  /n/scratch2/$USER/users/a/abc123/star

Copy the example htseq bash script:

Code Block
module load gcc/6.2.0 python/2.7.12 rcbio/1.13.3
cp /n/app/rcbio/1.1/bin/htseq.sh .


##############
note: rcbio/1.1 is not available yet. If you would like to try the version still in development stage, you can run:
export PATH=/home/ld32/rcbioDev/bin:$PATH
cp /home/ld32/rcbioDev/bin/3.3/bin/htseq.sh .

Now you can modify the options as needed. For example, if your file are huge, you may need increase mem and runtime -t for sbatch command. 

To edit the htseq bash script:

Code Block
nano htseq.sh
#or if you have single end reads
nano htseqSingle.sh

To test the pipeline run the following command if you did alignment by bwa as on this page. If you did alignment using bowtie2 following this page, please change -p

...

bwaOut to -p bowtieOut, or if you used star following this page, please change -p bwaOut to -p starOut. Jobs will not be submitted to the scheduler.

Code Block
runAsPipeline "htseq.sh -p bwaOut -r dm3" "sbatch -p short --mem 4G -t

...

 1:0:0 -n 1" useTmp
#or if you have single end reads
runAsPipeline "htseqSingle.sh -p bwaOut -r dm3" "sbatch -p short --mem 4G -t 1:0:0 -n 1" useTmp
# this is a test run

To run the pipeline:

Code Block
runAsPipeline "htseq.sh -p bwaOut -r dm3" "sbatch -p short --mem 4G -t

...

 1:0:0 -n 1" useTmp run 2>&1 | tee output.log
#or if you have single end reads
runAsPipeline "htseqSingle.sh -p bwaOut -r dm3" "sbatch -p short --mem 4G -t 1:0:0 -n 1" useTmp run 2>&1 | tee output.log

# notice here 'run 2>&1 | tee output.log' is added to the command

To understand how 'runAsPipeline' works, how to check output, how to re-run the pipeline, please visit: Run Bash Script As Slurm Pipeline

Now you are ready to run an rcbio workflow

To instead run the workflow on your own data, transfer the sample sheet to your local machine following this wiki page and modify the sample sheet. Then you can transfer it back to O2 under your account, then go to the build folder structure step.