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
283e3ecd
Commit
283e3ecd
authored
5 years ago
by
Brandi Cantarel
Browse files
Options
Downloads
Patches
Plain Diff
add skip to qc steps when not necessary
parent
d8b85458
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
alignment/bamqc.sh
+12
-8
12 additions, 8 deletions
alignment/bamqc.sh
with
12 additions
and
8 deletions
alignment/bamqc.sh
+
12
−
8
View file @
283e3ecd
...
...
@@ -13,7 +13,7 @@ usage() {
exit
1
}
OPTIND
=
1
# Reset OPTIND
while
getopts
:r:b:c:n:p:d:h opt
while
getopts
:r:b:c:n:p:
s:
d:h opt
do
case
$opt
in
r
)
index_path
=
$OPTARG
;;
...
...
@@ -22,6 +22,7 @@ do
n
)
nuctype
=
$OPTARG
;;
p
)
pair_id
=
$OPTARG
;;
d
)
dedup
=
$OPTARG
;;
s
)
skiplc
=
1
;
h
)
usage
;;
esac
done
...
...
@@ -52,15 +53,18 @@ fi
if
[[
$nuctype
==
'dna'
]]
;
then
module load bedtools/2.26.0 picard/2.10.3
samtools view -@
$SLURM_CPUS_ON_NODE
-b
-L
${
bed
}
-o
${
pair_id
}
.ontarget.bam
${
sbam
}
samtools index -@
$SLURM_CPUS_ON_NODE
${
pair_id
}
.ontarget.bam
samtools flagstat
${
pair_id
}
.ontarget.bam
>
${
pair_id
}
.ontarget.flagstat.txt
if
[[
-z
$skiplc
]]
then
samtools view -@
$SLURM_CPUS_ON_NODE
-b
-L
${
bed
}
-o
${
pair_id
}
.ontarget.bam
${
sbam
}
samtools index -@
$SLURM_CPUS_ON_NODE
${
pair_id
}
.ontarget.bam
samtools flagstat
${
pair_id
}
.ontarget.bam
>
${
pair_id
}
.ontarget.flagstat.txt
java
-Xmx64g
-jar
$PICARD
/picard.jar CollectAlignmentSummaryMetrics
R
=
${
index_path
}
/genome.fa
I
=
${
pair_id
}
.ontarget.bam
OUTPUT
=
${
pair_id
}
.alignmentsummarymetrics.txt
java
-Xmx64g
-XX
:ParallelGCThreads
=
$SLURM_CPUS_ON_NODE
-jar
$PICARD
/picard.jar EstimateLibraryComplexity
I
=
${
sbam
}
OUTPUT
=
${
pair_id
}
.libcomplex.txt
samtools view -@
$SLURM_CPUS_ON_NODE
-b
-q
1
${
sbam
}
| bedtools coverage
-sorted
-hist
-g
${
index_path
}
/genomefile.txt
-b
stdin
-a
${
bed
}
>
${
pair_id
}
.mapqualcov.txt
samtools view -@
$SLURM_CPUS_ON_NODE
${
sbam
}
|
awk
'{sum+=$5} END { print "Mean MAPQ =",sum/NR}'
>
${
pair_id
}
.meanmap.txt
fi
java
-Xmx64g
-jar
$PICARD
/picard.jar CollectInsertSizeMetrics
INPUT
=
${
sbam
}
HISTOGRAM_FILE
=
${
pair_id
}
.hist.ps
REFERENCE_SEQUENCE
=
${
index_path
}
/genome.fa
OUTPUT
=
${
pair_id
}
.hist.txt
java
-Xmx64g
-jar
$PICARD
/picard.jar CollectAlignmentSummaryMetrics
R
=
${
index_path
}
/genome.fa
I
=
${
pair_id
}
.ontarget.bam
OUTPUT
=
${
pair_id
}
.alignmentsummarymetrics.txt
java
-Xmx64g
-jar
$PICARD
/picard.jar EstimateLibraryComplexity
I
=
${
sbam
}
OUTPUT
=
${
pair_id
}
.libcomplex.txt
samtools view -@
$SLURM_CPUS_ON_NODE
-b
-q
1
${
sbam
}
| bedtools coverage
-sorted
-hist
-g
${
index_path
}
/genomefile.txt
-b
stdin
-a
${
bed
}
>
${
pair_id
}
.mapqualcov.txt
bedtools coverage
-sorted
-g
${
index_path
}
/genomefile.txt
-a
${
bed
}
-b
${
sbam
}
-hist
>
${
pair_id
}
.covhist.txt
grep
^all
${
pair_id
}
.covhist.txt
>
${
pair_id
}
.genomecov.txt
samtools view -@
$SLURM_CPUS_ON_NODE
${
sbam
}
|
awk
'{sum+=$5} END { print "Mean MAPQ =",sum/NR}'
>
${
pair_id
}
.meanmap.txt
perl
$baseDir
/calculate_depthcov.pl
${
pair_id
}
.covhist.txt
fi
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