Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IMP
IMP_manuscript_analysis
Commits
5ec29408
Commit
5ec29408
authored
Jun 03, 2016
by
Shaman Narayanasamy
Browse files
Ad command
parent
9375a47e
Changes
1
Hide whitespace changes
Inline
Side-by-side
additional_analyses/HMP_gene_catalog/count_IMP_HMP.sh
View file @
5ec29408
...
...
@@ -6,6 +6,8 @@ THREADS=12
declare
-a
SAMPLES
=(
"HF1"
"HF2"
"HF3"
"HF4"
"HF5"
)
paste
<
(
echo
"Mappings"
)
<
(
echo
"proper_pairs"
)
>
IMP2IGC_mapping.txt
date
for
S
in
"
${
SAMPLES
[@]
}
"
do
...
...
@@ -16,7 +18,7 @@ IMP_MT_BAM="/scratch/users/snarayanasamy/IMP_MS_data/IMP_analysis/${S}/Assembly/
IMP_MT_MEGAHIT_BAM
=
"/scratch/users/snarayanasamy/IMP_MS_data/IMP_analysis/
${
S
}
_megahit/Assembly/MT.reads.sorted.bam"
IGC_MT_BAM
=
"/scratch/users/snarayanasamy/IMP_MS_data/HMP_IGC_mapping/
${
S
}
/MT_IMP_x_HMP.sorted.bam"
paste
<
(
echo
-e
"
${
S
}
_MG_IMP_IGC"
)
<
(
sort
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IMP_MG_BAM
}
|
cut
-f1
)
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IGC_MG_BAM
}
|
cut
-f1
)
|
uniq
|
wc
-l
)
>
IMP2IGC_mapping.txt
paste
<
(
echo
-e
"
${
S
}
_MG_IMP_IGC"
)
<
(
sort
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IMP_MG_BAM
}
|
cut
-f1
)
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IGC_MG_BAM
}
|
cut
-f1
)
|
uniq
|
wc
-l
)
>
>
IMP2IGC_mapping.txt
paste
<
(
echo
-e
"
${
S
}
_MG_IMP-megahit_IGC"
)
<
(
sort
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IMP_MG_MEGAHIT_BAM
}
|
cut
-f1
)
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IGC_MG_BAM
}
|
cut
-f1
)
|
uniq
|
wc
-l
)
>>
IMP2IGC_mapping.txt
...
...
@@ -25,3 +27,11 @@ paste <(echo -e "${S}_MT_IMP_IGC") <(sort <(samtools view -f 2 -@ ${THREADS} ${I
paste
<
(
echo
-e
"
${
S
}
_MT_IMP-megahit_IGC"
)
<
(
sort
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IMP_MT_MEGAHIT_BAM
}
|
cut
-f1
)
<
(
samtools view
-f
2 -@
${
THREADS
}
${
IGC_MT_BAM
}
|
cut
-f1
)
|
uniq
|
wc
-l
)
>>
IMP2IGC_mapping.txt
done
date
### For some reason, HF4 produced weird results
bwa mem
-v
1
-t
12
-M
-R
"@RG
\t
ID:HF4
\t
SM:MT"
/work/projects/ecosystem_biology/MUST/databases/integrated_reference_catalog/IGC.fa /scratch/users/snarayanasamy/IMP_MS_data/IMP_analysis/HF4/Preprocessing/MT.R1.preprocessed.fq /scratch/users/snarayanasamy/IMP_MS_data/IMP_analysis/HF4/Preprocessing/MT.R2.preprocessed.fq | samtools view -@ 12
-bS
-
>
new_IMP_IGC_mapping.bam
sort
<
(
samtools view
-f2
new_IMP_IGC_mapping.bam |
cut
-f1
)
<
(
samtools view
-f2
/scratch/users/snarayanasamy/IMP_MS_data/IMP_analysis/HF4/Assembly/MT.reads.sorted.bam |
cut
-f1
)
|
uniq
|
wc
-l
sort
<
(
samtools view
-f2
new_IMP_IGC_mapping.bam |
cut
-f1
)
<
(
samtools view
-f2
/scratch/users/snarayanasamy/IMP_MS_data/IMP_analysis/HF4_megahit/Assembly/MT.reads.sorted.bam |
cut
-f1
)
|
uniq
|
wc
-l
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