Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gonzalo S Nido
wgbs-pipeline
Commits
84b7d4a3
Commit
84b7d4a3
authored
Sep 04, 2020
by
Gonzalo S Nido
Browse files
Merge branch 'master' into 'scp-sample'
# Conflicts: # prepare_vm.sh
parents
0a35040a
10abca86
Changes
2
Hide whitespace changes
Inline
Side-by-side
prepare_vm.sh
View file @
84b7d4a3
...
...
@@ -4,7 +4,7 @@ echo "#### Updating Ubuntu dist..."
sudo
apt update
&&
sudo
apt
-y
upgrade
echo
"#### Installing some Ubuntu packages..."
sudo
apt
-y
install
unzip build-essential libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev p7zip-full
sudo
apt
-y
install
unzip build-essential libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev p7zip-full
pigz
sudo
apt
-y
install
neovim
echo
"#### Installing samtools 1.10..."
...
...
wgbs-pipeline.sh
View file @
84b7d4a3
...
...
@@ -2,7 +2,7 @@
# Some variables
MT_chr_name
=
"chrM"
LAMBDA_chr_name
=
"
chrL
"
LAMBDA_chr_name
=
"
NC_001416.1
"
# Get pipeline folder
PIPELINEPATH
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
...
...
@@ -43,7 +43,23 @@ SUBSET_READS=false
########################################
# Check that both MT chromosome and lambda are present in the reference
if
!
grep
-m1
-q
"^>
${
MT_chr_name
}
"
${
b38_ref
}
/Bisulfite_Genome/CT_conversion/genome_mfa.CT_conversion.fa
;
then
echo
"ERROR:
\"
${
MT_chr_name
}
\"
does not exist in
${
b38_ref
}
"
exit
1
fi
if
grep
-m1
-q
"^>
${
MT_chr_name
}
"
${
nuc_ref
}
/Bisulfite_Genome/CT_conversion/genome_mfa.CT_conversion.fa
;
then
echo
"ERROR:
\"
${
MT_chr_name
}
\"
is present in the nuclear-only reference:
${
nuc_ref
}
"
exit
1
fi
if
!
grep
-m1
-q
"^>
${
MT_chr_name
}
"
${
mt_ref
}
/Bisulfite_Genome/CT_conversion/genome_mfa.CT_conversion.fa
;
then
echo
"ERROR:
\"
${
MT_chr_name
}
\"
does not exist in
${
mt_ref
}
"
exit
1
fi
if
!
grep
-m1
-q
"^>
${
LAMBDA_chr_name
}
"
${
b38_ref
}
/Bisulfite_Genome/CT_conversion/genome_mfa.CT_conversion.fa
;
then
echo
"ERROR:
\"
${
LAMBDA_chr_name
}
\"
does not exist in
${
b38_ref
}
"
exit
1
fi
# Exit when any command fails
...
...
@@ -291,23 +307,24 @@ else
echo
"DONE"
fi
echo
-ne
" 1.5 Extracting MT and Lambda methylation... "
CMD
=
"cat
${
output_dir
}
/CpG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
MT_chr_name
}
| gz
ip
-nc >
\
CMD
=
"cat
${
output_dir
}
/CpG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
MT_chr_name
}
|
pi
gz -nc >
\
${
output_dir
}
/CpG_context_chrM_
${
sample_id
}
.dedup.txt.gz &&
\
cat
${
output_dir
}
/CpG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
LAMBDA_chr_name
}
| gz
ip
-nc >
\
cat
${
output_dir
}
/CpG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
LAMBDA_chr_name
}
|
pi
gz -nc >
\
${
output_dir
}
/CpG_context_LAMBDA_
${
sample_id
}
.dedup.txt.gz &&
\
gz
ip
${
output_dir
}
/CpG_context_b38_
${
sample_id
}
.dedup.txt
\n\
cat
${
output_dir
}
/CHH_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
MT_chr_name
}
| gz
ip
-nc >
\
pi
gz
${
output_dir
}
/CpG_context_b38_
${
sample_id
}
.dedup.txt
\n\
cat
${
output_dir
}
/CHH_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
MT_chr_name
}
|
pi
gz -nc >
\
${
output_dir
}
/CHH_context_chrM_
${
sample_id
}
.dedup.txt.gz &&
\
cat
${
output_dir
}
/CHH_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
LAMBDA_chr_name
}
| gz
ip
-nc >
\
cat
${
output_dir
}
/CHH_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
LAMBDA_chr_name
}
|
pi
gz -nc >
\
${
output_dir
}
/CHH_context_LAMBDA_
${
sample_id
}
.dedup.txt.gz &&
\
gz
ip
${
output_dir
}
/CHH_context_b38_
${
sample_id
}
.dedup.txt
\n\
cat
${
output_dir
}
/CHG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
MT_chr_name
}
| gz
ip
-nc >
\
pi
gz
${
output_dir
}
/CHH_context_b38_
${
sample_id
}
.dedup.txt
\n\
cat
${
output_dir
}
/CHG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
MT_chr_name
}
|
pi
gz -nc >
\
${
output_dir
}
/CHG_context_chrM_
${
sample_id
}
.dedup.txt.gz &&
\
cat
${
output_dir
}
/CHG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
LAMBDA_chr_name
}
| gz
ip
-nc >
\
cat
${
output_dir
}
/CHG_context_b38_
${
sample_id
}
.dedup.txt | python3
${
ext_chr_srt
}
${
LAMBDA_chr_name
}
|
pi
gz -nc >
\
${
output_dir
}
/CHG_context_LAMBDA_
${
sample_id
}
.dedup.txt.gz &&
\
gz
ip
${
output_dir
}
/CHG_context_b38_
${
sample_id
}
.dedup.txt
\n\
pi
gz
${
output_dir
}
/CHG_context_b38_
${
sample_id
}
.dedup.txt
\n\
zcat
${
output_dir
}
/C??_context_LAMBDA_
${
sample_id
}
.dedup.txt.gz | python3
${
meth_prop
}
>
\
${
output_dir
}
/Lambda_meth_prop_
${
sample_id
}
.txt"
echo
-e
${
CMD
}
>
${
log_dir
}
/1_5_extract_MT.cmd
...
...
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