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
283f4815
Commit
283f4815
authored
4 years ago
by
Brandi Cantarel
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.biohpc.swmed.edu:ngsclialab/process_scripts
parents
e3b7d3bd
1b3892e5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
alignment/bamqc.sh
+13
-3
13 additions, 3 deletions
alignment/bamqc.sh
alignment/sequenceqc_dna.pl
+3
-1
3 additions, 1 deletion
alignment/sequenceqc_dna.pl
with
16 additions
and
4 deletions
alignment/bamqc.sh
+
13
−
3
View file @
283f4815
...
...
@@ -35,6 +35,11 @@ shift $(($OPTIND -1))
# usage
#fi
if
[[
-z
$version
]]
then
version
=
'NA'
fi
source
/etc/profile.d/modules.sh
module load samtools/gcc/1.10 fastqc/0.11.8
samtools flagstat
${
sbam
}
>
${
pair_id
}
.flagstat.txt
...
...
@@ -55,7 +60,7 @@ fi
tmpdir
=
`
pwd
`
if
[[
$nuctype
==
'dna'
]]
;
then
module load bedtools/2.29.2 picard/2.10.3
bedtools coverage
-sorted
-g
${
index_path
}
/genomefile.txt
-a
${
bed
}
-b
${
sbam
}
-hist
>
${
pair_id
}
.covhist.txt
bedtools coverage
-a
${
bed
}
-b
${
sbam
}
-hist
>
${
pair_id
}
.covhist.txt
grep
^all
${
pair_id
}
.covhist.txt
>
${
pair_id
}
.genomecov.txt
perl
$baseDir
/calculate_depthcov.pl
${
pair_id
}
.covhist.txt
if
[[
-z
$skiplc
]]
...
...
@@ -63,13 +68,18 @@ if [[ $nuctype == 'dna' ]]; then
samtools view -@
$NPROC
-b
-L
${
bed
}
-o
${
pair_id
}
.ontarget.bam
${
sbam
}
samtools index -@
$NPROC
${
pair_id
}
.ontarget.bam
samtools flagstat
${
pair_id
}
.ontarget.bam
>
${
pair_id
}
.ontarget.flagstat.txt
samtools view -@
$NPROC
-b
-q
1
${
sbam
}
| bedtools coverage
-
sorted
-hist
-g
${
index_path
}
/genomefile.tx
t
-b
stdin
-a
${
bed
}
>
${
pair_id
}
.mapqualcov.txt
samtools view -@
$NPROC
-b
-q
1
${
sbam
}
| bedtools coverage
-
his
t
-b
stdin
-a
${
bed
}
>
${
pair_id
}
.mapqualcov.txt
java
-Xmx64g
-Djava
.io.tmpdir
=
${
tmpdir
}
-XX
:ParallelGCThreads
=
$NPROC
-jar
$PICARD
/picard.jar EstimateLibraryComplexity
BARCODE_TAG
=
RG
I
=
${
sbam
}
OUTPUT
=
${
pair_id
}
.libcomplex.txt
TMP_DIR
=
${
tmpdir
}
#java -Xmx64g -Djava.io.tmpdir=${tmpdir} -jar $PICARD/picard.jar CollectAlignmentSummaryMetrics R=${index_path}/genome.fa I=${pair_id}.ontarget.bam OUTPUT=${pair_id}.alignmentsummarymetrics.txt TMP_DIR=${tmpdir}
#samtools view -@ $NPROC ${sbam} | awk '{sum+=$5} END { print "Mean MAPQ =",sum/NR}' > ${pair_id}.meanmap.txt
fi
#java -Xmx64g -Djava.io.tmpdir=${tmpdir} -jar $PICARD/picard.jar CollectInsertSizeMetrics INPUT=${sbam} HISTOGRAM_FILE=${pair_id}.hist.ps REFERENCE_SEQUENCE=${index_path}/genome.fa OUTPUT=${pair_id}.hist.txt TMP_DIR=${tmpdir}
perl
$baseDir
/sequenceqc_dna.pl
-e
${
version
}
-r
$index_path
${
pair_id
}
.genomecov.txt
if
[[
$index_path
/reference_info.pl
]]
then
perl
$baseDir
/sequenceqc_dna.pl
-e
${
version
}
-r
$index_path
${
pair_id
}
.genomecov.txt
else
touch
${
pair_id
}
.genomecov.txt
fi
else
perl
$baseDir
/sequenceqc_rna.pl
-e
${
version
}
-r
$index_path
${
pair_id
}
.flagstat.txt
fi
This diff is collapsed.
Click to expand it.
alignment/sequenceqc_dna.pl
+
3
−
1
View file @
283f4815
...
...
@@ -122,7 +122,9 @@ foreach $sfile (@statfiles) {
"
Alignment_Status
\t
"
.
$hash
{
status
},"
Alignment_Date
\t
"
.
$hash
{
date
},
"
File_Owner
\t
"
.
$hash
{
fileowner
},"
Workflow_Version
\t
"
.
$gittag
),"
\n
";
close
OUT
;
system
(
qq{cat $opt{refdir}\/reference_info.txt >> $prefix\.sequence.stats.txt}
);
if
(
-
e
"
$opt
{refdir}
\
/reference_info.txt
")
{
system
(
qq{cat $opt{refdir}\/reference_info.txt >> $prefix\.sequence.stats.txt}
);
}
##### END separateFilesPerSample ######
}
...
...
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