Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
process_scripts
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
NGS CLIA Lab
process_scripts
Commits
51ad2c96
Commit
51ad2c96
authored
4 years ago
by
Brandi Cantarel
Browse files
Options
Downloads
Patches
Plain Diff
adding checkmate bash script
parent
b3fce91f
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
variants/checkmate.sh
+64
-0
64 additions, 0 deletions
variants/checkmate.sh
variants/sequenceqc_somatic.pl
+20
-0
20 additions, 0 deletions
variants/sequenceqc_somatic.pl
with
84 additions
and
0 deletions
variants/checkmate.sh
0 → 100755
+
64
−
0
View file @
51ad2c96
#!/bin/bash
#checkmate.sh
usage
()
{
echo
"-h Help documentation for checkmate"
echo
"-r --Path to Reference Genome with the file genome.fa"
echo
"-p --Prefix for output file name"
echo
"-c --Path to Reference GenomeNGS Checkmate SNP BED file"
echo
"Example: bash checkmate.sh -p prefix -r /path/GRCh38 -c /path/NGSCheckMate.bed -f"
exit
1
}
OPTIND
=
1
# Reset OPTIND
while
getopts
:r:l:n:c:b:p:fh opt
do
case
$opt
in
r
)
index_path
=
$OPTARG
;;
p
)
pair_id
=
$OPTARG
;;
b
)
sbam
=
$OPTARG
;;
n
)
normal
=
$OPTARG
;;
f
)
filter
=
1
;;
c
)
capture
=
$OPTARG
;;
h
)
usage
;;
esac
done
function
join_by
{
local
IFS
=
"
$1
"
;
shift
;
echo
"
$*
"
;
}
shift
$((
$OPTIND
-
1
))
baseDir
=
"
`
dirname
\"
$0
\"
`
"
# Check for mandatory options
source
/etc/profile.d/modules.sh
export
PATH
=
/project/shared/bicf_workflow_ref/seqprg/bin:/usr/local/bin/:
$PATH
module load samtools/gcc/1.8 bcftools/gcc/1.8
if
[[
-z
$capture
]]
then
capture
=
"
${
index_path
}
/NGSCheckMate.bed"
fi
if
[[
-f
"
${
index_path
}
/genome.fa"
]]
then
reffa
=
"
${
index_path
}
/genome.fa"
fi
for
i
in
*
.bam
;
do
prefix
=
"
${
i
%.bam
}
"
echo
${
prefix
}
bcftools mpileup
-A
-d
1000000
-C50
-Ou
--gvcf
0
-f
${
reffa
}
-T
${
capture
}
$i
| bcftools call
-m
--gvcf
0
-Ov
| bcftools convert
--gvcf2vcf
-f
${
reffa
}
-Ov
-o
${
prefix
}
.vcf
done
if
[[
-f
/project/shared/bicf_workflow_ref/seqprg/bin/ncm.py
]]
then
ncm
=
/project/shared/bicf_workflow_ref/seqprg/bin/ncm.py
elif
[[
-f
/usr/local/bin/ncm.py
]]
then
ncm
=
/usr/local/bin/ncm.py
else
echo
"ncm missing"
fi
python
$ncm
-V
-d
./
-bed
$capture
-O
./
-N
${
pair_id
}
perl
$baseDir
/sequenceqc_somatic.pl
-i
${
pair_id
}
_all.txt
-o
${
pair_id
}
.sequence.stats.txt
This diff is collapsed.
Click to expand it.
variants/sequenceqc_somatic.pl
0 → 100755
+
20
−
0
View file @
51ad2c96
#!/usr/bin/perl -w
#uploadqc.pl
use
Getopt::
Long
qw(:config no_ignore_case no_auto_abbrev)
;
my
%opt
=
();
my
$results
=
GetOptions
(
\
%opt
,'
input|i=s
','
output|o=s
','
help|h
');
open
MATE
,
"
<
$opt
{input}
"
or
die
$!
;
while
(
my
$line
=
<
MATE
>
)
{
chomp
(
$line
);
my
(
$sam1
,
$pf
,
$sam2
,
$corr
,
$depth
)
=
split
(
/\t/
,
$line
);
$sam1
=
(
split
(
/\./
,
$sam1
))[
0
];
$sam2
=
(
split
(
/\./
,
$sam2
))[
0
];
open
OUT
,
"
>
$opt
{output}
"
or
die
$!
;
my
$status
=
'
PASS
';
$status
=
'
FAIL
'
if
(
$pf
eq
'
unmatched
');
print
OUT
join
("
\n
","
Sample_1
\t
"
.
$sam1
,"
Sample_2
\t
"
.
$sam2
,"
Correlation
\t
"
.
$corr
,
"
Depth
\t
"
.
$depth
,"
Status
\t
"
.
$status
),"
\n
";
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment