Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
eortega
coevolution
Commits
300e8e7f
Commit
300e8e7f
authored
Jan 14, 2020
by
eortega
Browse files
Merge branch 'Check_run_post_restructure' into 'master'
Check run post restructure See merge request
!5
parents
fe922c14
e54f91ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
phages/scripts/03_mapping.sh
View file @
300e8e7f
#!/bin/bash
## Arguments in the order
## 1- working directory
## 2- name of the step
## 3- name of the previous step
## 4- link to fasta reference
## DEFINE PATH
path
=
$1
# path=/home/enrique/work/Gandon/coevolution/phages/
step_name
=
$2
prev_step
=
$3
# ref=data/refs/Sv2972/
ref
=
$4
## CREATE INDEXES AND
...
...
@@ -14,13 +27,27 @@ path=$1
# bowtie2 --phred33 -5 12 -p 35 -t -x ${path}data/refs/indexes_Sv/Sv -1 ${path}data/trimmed/W_seq/W4T3_S54_R1.fq.gz -2 ${path}data/trimmed/W_seq/W4T3_S54_R2.fq.gz -S ${path}results/test.sam
path_fasta
=
${
path
}
data/trimmed/
## CHECK FOR INDEXES
test
-f
${
ref
/.fasta
}
.1.bt2
if
[
$?
-eq
1
]
;
then
echo
'Index for bowtie2 not present near fasta file'
bowtie2-build
$ref
${
ref
/.fasta
}
echo
'Created index for bowtie2'
fi
path_fasta
=
${
path
}
steps/
${
prev_step
}
path_results
=
${
path
}
results
/
path_results
=
${
path
}
steps/
${
step_name
}
/
bacteria_index
=
${
path
}
data/refs/indexes_St/St
#
bacteria_index=${path}data/refs/indexes_St/St
virus_index
=
${
path
}
data/refs/indexes_Sv/Sv
virus_index
=
${
ref
/.fasta
}
for
i
in
$(
find
$path_fasta
-name
*
_R1.fq.gz
)
...
...
phages/scripts/04_snpcalling.sh
View file @
300e8e7f
...
...
@@ -2,13 +2,15 @@
## SNPCALLING
wd
=
$1
## Working directory's path
ref
=
$2
## path to reference.fasta
od
=
$3
## Output directory
path
=
$1
## Working directory's path
step_name
=
$2
bam
=
$3
## name of step which created the bam files to be used
ref
=
$4
## path to reference.fasta
od
=
${
path
}${
step_name
}
/
## Output directory
for
i
in
$(
find
results/mapping
/
-type
f
-name
*
.bam
)
for
i
in
$(
find
${
path
}
steps/
${
bam
}
/
-type
f
-name
*
.bam
)
do
od2
=
$(
dirname
$i
)
;
od2
=
${
od2
/mapping/snpcalling
}
...
...
phages/scripts/procedure.sh
View file @
300e8e7f
...
...
@@ -56,3 +56,23 @@ done
###################################
## Trimm and clean
./scripts/02_trimm_and_clean.sh
$PWD
/ trimming
###################################
## Mapping on virus
## Arguments in the order
## 1- working directory
## 2- name of the step
## 3- name of the previous step
## 4- link to fasta reference
./scripts/03_mapping.sh
$PWD
/ map_on_phage trimming data/refs/Sv2972/NC_007019.1.fasta
###################################
## SNPcalling
## Arguments in the order
## 1- working directory
## 2- name of the step
## 3- name of the previous step. The one which produced the bam files
## 4- link to fasta reference
./scripts/04_snpcalling.sh
$PWD
/ snpcall_freebayes mapping data/refs/Sv2972/NC_007019.1.fasta
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment