...
First prepare a directory to work infor the vibCho fasta, and change to it:
Code Block |
---|
|
mkdir -p $SCRATCH/core_ngs/references/vibChofasta
cd $SCRATCH/core_ngs/references/vibChofasta |
V. cholerae has two chromosomes. We download each separately.
...
Expand |
---|
title | Get the 4 downloaded files here |
---|
|
Code Block |
---|
| mkdir -p $SCRATCH/core_ngs/references/vibChofasta
cd $SCRATCH/core_ngs/references/vibChofasta
cp $CORENGS/ncbireferences/vibChofasta/NC_* . |
|
Once you have the 4 files locally in your $SCRATCH/core_ngs/references/vibCho directory, combine them using cat:
Code Block |
---|
|
cd $SCRATCH/core_ngs/references/vibChofasta
cat NC_01258[23].fa > vibCho.O395.fa
cat NC_01258[23].gff3 > vibCho.O395.gff3
# verify there are 2 contigs in vibCho.O395.fa
grep -P '^>' vibCho.O395.fa |
Now we have a reference sequence file that we can use with the bowtie2 reference builder, and ultimately align sequence data against.
...
First create a directory specifically for the bowtie2 index, then build the index using bowtie-build.
Expand |
---|
|
| title | Prepare Bowtie2 index files for vibCho | mkdir -p $SCRATCH/core_ngs/references/ | bt2/vibChofasta
cd $SCRATCH/core_ngs/references/fasta
cp $CORENGS/references/ | bt2
# Symlink to the fasta file you created
ln -sf
|
---|
Code Block |
---|
language | bash |
---|
title | Prepare Bowtie2 index files for vibCho |
---|
|
mkdir -p $SCRATCH/core_ngs/references/bt2/vibCho
cd $SCRATCH/core_ngs/references/bt2/vibCho.O395.fa
# or,Symlink to catch up: the fasta file you created using relative path syntax
ln -sf $CORENGS/references../../fasta/vibCho.O395.fa
bowtie2-build vibCho.O395.fa vibCho.O395
|
...
Performing the bowtie2 alignment
We'll set up a new Make sure you're in an idev session with the bowtie2 BioContainers module loaded:
Code Block |
---|
|
idev -m 120 -A OTH21164 -N 1 -r CoreNGSday4
module load biocontainers
module load bowtie2 |
We'll set up a new directory to perform the V. cholerae data alignment. But first make sure you have the FASTQ file to align and the vibCho bowtie2 index:.
Code Block |
---|
|
# Get the FASTQ to align a pre-built vibCho index if you didn't already build one
mkdir -p $SCRATCH/core_ngs/references/alignmentbt2/fastqvibCho
cp $CORENGS/references/bt2/alignmentvibCho/*fastq.gz* $SCRATCH/core_ngs/references/alignmentbt2/fastqvibCho/
# SetGet upthe theFASTQ bowtie2to indexalign
mkdir -p $SCRATCH/core_ngs/referencesalignment/bt2/vibChofastq
cp $CORENGS/idx/bt2/vibChoalignment/*fastq.*gz $SCRATCH/core_ngs/referencesalignment/bt2/vibCho/ |
Make sure you're in an idev session with the bowtie2 BioContainers module loaded:
Code Block |
---|
|
idev -m 120 -A OTH21164 -N 1 -r CoreNGSday4
module load biocontainers
module load bowtie2fastq/
|
Now set up a directory to do this alignment, with symbolic links to the bowtie2 index directory and the directory containing the FASTQ to align:
...
So execute this bowtie2 global, single-end alignment command:
Expand |
---|
|
Code Block |
---|
| mkdir -p $SCRATCH/core_ngs/references/fasta
cp $CORENGS/references/fasta/vibCho* $SCRATCH/core_ngs/references/fasta/
mkdir -p $SCRATCH/core_ngs/references/bt2/vibCho
cp $CORENGS/references/bt2/vibCho/*.* $SCRATCH/core_ngs/references/bt2/vibCho/
mkdir -p $SCRATCH/core_ngs/alignment/vibCho
cd $SCRATCH/core_ngs/alignment/vibCho
ln -sf ../../references/bt2/vibCho
ln -sf ../../alignment/fastq fqmkdir -p $SCRATCH/core_ngs/alignment/vibCho |
|
Code Block |
---|
|
cd $SCRATCH/core_ngs/alignment/vibCho
bowtie2 -x vibCho/vibCho.O395 -U fq/cholera_rnaseq.fastq.gz -S cholera_rnaseq.sam 2>&1 | tee aln_global.log |
...