Skip to content

Commit

Permalink
Updated linux test scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlo committed Mar 8, 2024
1 parent 7654b0f commit 0785581
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
1 change: 1 addition & 0 deletions scripts/linux/0_linux_intro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tar -xzvf files.tar.gz
echo "6 Copying and moving files"
mv important_results/temp_file-1 backed_up_proj_folder/
mv important_results/dna_data_analysis_result_file_that_is_important-you_should_really_use_tab_completion_for_file_names.bam backed_up_proj_folder/
rm -rf a_better_name
mv a_strange_name a_better_name
ls -l
cp backed_up_proj_folder/last_years_data external_hdd/
Expand Down
8 changes: 4 additions & 4 deletions scripts/linux/3_linux_pipelines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ projid=${1:?No projid specified (required).}
user=${2:-$USER}

# copy files for lab
mkdir /proj/$projid/nobackup/$user/uppmax_pipeline_exercise
mkdir -p /proj/$projid/nobackup/$user/uppmax_pipeline_exercise
cp -r /sw/courses/ngsintro/linux/uppmax_pipeline_exercise/data/* /proj/$projid/nobackup/$user/uppmax_pipeline_exercise
cd /proj/$projid/nobackup/$user/uppmax_pipeline_exercise

Expand All @@ -19,9 +19,9 @@ export PATH=$PATH:/sw/courses/ngsintro/linux/uppmax_pipeline_exercise/dummy_scri
filter_reads -h

cd /proj/$projid/nobackup/$user/uppmax_pipeline_exercise/exomeSeq
filter_reads -i raw_data/my_reads.rawdata.fastq -o raw_data/my_reads.filtered.fastq
align_reads -i raw_data/my_reads.filtered.fastq -o my_reads.filtered.sam -r /sw/data/uppnex/reference/Homo_sapiens/hg19/concat_rm/Homo_sapiens.GRCh37.57.dna_rm.concat.fa
find_snps -i raw_data/my_reads.filtered.fastq -o my_reads.filtered.vcf -r /sw/data/uppnex/reference/Homo_sapiens/hg19/concat_rm/Homo_sapiens.GRCh37.57.dna_rm.concat.fa
filter_reads -d -i raw_data/my_reads.rawdata.fastq -o raw_data/my_reads.filtered.fastq
align_reads -d -i raw_data/my_reads.filtered.fastq -o my_reads.filtered.sam -r /sw/data/uppnex/reference/Homo_sapiens/hg19/concat_rm/Homo_sapiens.GRCh37.57.dna_rm.concat.fa
find_snps -d -i raw_data/my_reads.filtered.fastq -o my_reads.filtered.vcf -r /sw/data/uppnex/reference/Homo_sapiens/hg19/concat_rm/Homo_sapiens.GRCh37.57.dna_rm.concat.fa



Expand Down
10 changes: 5 additions & 5 deletions scripts/linux/4_linux_filetypes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ tree
export PATH=$PATH:/sw/courses/ngsintro/linux/uppmax_pipeline_exercise/dummy_scripts

# run programs
reference_indexer -r 0_ref/ad2.fa
align_reads -r 0_ref/ad2.fa -i 0_seq/ad2.fq -o 1_alignment/ad2.sam
sambam_tool -f bam -i 1_alignment/ad2.sam -o 2_bam/ad2.bam
sambam_tool -f sort -i 2_bam/ad2.bam -o 3_sorted/ad2.sorted.bam
sambam_tool -f index -i 3_sorted/ad2.sorted.bam
reference_indexer -d -r 0_ref/ad2.fa
align_reads -d -r 0_ref/ad2.fa -i 0_seq/ad2.fq -o 1_alignment/ad2.sam
sambam_tool -d -f bam -i 1_alignment/ad2.sam -o 2_bam/ad2.bam
sambam_tool -d -f sort -i 2_bam/ad2.bam -o 3_sorted/ad2.sorted.bam
sambam_tool -d -f index -i 3_sorted/ad2.sorted.bam
mv 3_sorted/ad2.sorted.bam.bai 3_sorted/ad2.sorted.bai

# cram
Expand Down
37 changes: 37 additions & 0 deletions scripts/linux/test_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash -l

set -x # print commands before executing
set -e # exit on errors

# get projid or die trying
projid=${1:?No projid specified (required).}

echo "Starting script 0"
bash 0_linux_intro.sh $projid
echo "Ended script 0"

echo "Starting script 1"
bash 1_linux_advanced.sh $projid
echo "Ended script 1"

echo "Starting script 2"
bash 2_linux_uppmax.sh $projid
echo "Ended script 2"

echo "Starting script 3"
bash 3_linux_pipelines.sh $projid
echo "Ended script 3"

echo "Starting script 4"
bash 4_linux_filetypes.sh $projid
echo "Ended script 4"

echo """
____ _ _ ____ ____ _____ ____ ____
/ ___|| | | |/ ___/ ___| ____/ ___/ ___|
\___ \| | | | | | | | _| \___ \___ \
___) | |_| | |__| |___| |___ ___) |__) |
|____/ \___/ \____\____|_____|____/____/
All test ran without errors.
"""

0 comments on commit 0785581

Please sign in to comment.