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
aaef66b3
Commit
aaef66b3
authored
7 years ago
by
Brandi Cantarel
Browse files
Options
Downloads
Patches
Plain Diff
update dnaalignment
parent
9e9fa0e7
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
+2
-8
2 additions, 8 deletions
alignment/bamqc.sh
alignment/dnaseqalign.sh
+6
-12
6 additions, 12 deletions
alignment/dnaseqalign.sh
with
8 additions
and
20 deletions
alignment/bamqc.sh
+
2
−
8
View file @
aaef66b3
...
...
@@ -8,14 +8,14 @@ usage() {
echo
"-n --NucType"
echo
"-p --Prefix for output file name"
echo
"-c --Capture Bedfile"
echo
"Example: bash
hisat
.sh -p prefix -r
GRCh38 -a hisat -x SRR1551047_1.fastq.gz -y SRR1551047_2.fastq.gz
"
echo
"Example: bash
bamqc
.sh -p prefix -r
/project/shared/bicf_workflow_ref/GRCh38 -b SRR1551047.bam -y dna -c target.bed
"
exit
1
}
OPTIND
=
1
# Reset OPTIND
while
getopts
:r:b:n:p:h opt
do
case
$opt
in
r
)
refgeno
=
$OPTARG
;;
r
)
index_path
=
$OPTARG
;;
b
)
sbam
=
$OPTARG
;;
c
)
bed
=
$OPTARG
;;
y
)
nuctype
=
$OPTARG
;;
...
...
@@ -31,12 +31,6 @@ if [[ -z $pair_id ]] || [[ -z $fq1 ]]; then
usage
fi
if
[
$refgeno
==
'GRCh38'
]
||
[
$refgeno
==
'GRCm38'
]
;
then
index_path
=
/project/shared/bicf_workflow_ref/
${
refgeno
}
else
usage
fi
module load samtools/1.6 fastqc/0.11.5
samtools flagstat
${
sbam
}
>
${
pair_id
}
.flagstat.txt
fastqc
-f
bam
${
sbam
}
...
...
This diff is collapsed.
Click to expand it.
alignment/dnaseqalign.sh
+
6
−
12
View file @
aaef66b3
...
...
@@ -7,14 +7,14 @@ usage() {
echo
"-x --FastQ R1"
echo
"-y --FastQ R2"
echo
"-p --Prefix for output file name"
echo
"Example: bash
hisat
.sh -p prefix -r GRCh38 -x SRR1551047_1.fastq.gz -y SRR1551047_2.fastq.gz"
echo
"Example: bash
dnaseqalign
.sh -p prefix -r
/project/shared/bicf_workflow_ref/
GRCh38 -x SRR1551047_1.fastq.gz -y SRR1551047_2.fastq.gz"
exit
1
}
OPTIND
=
1
# Reset OPTIND
while
getopts
:r:a:x:y:p:h opt
do
case
$opt
in
r
)
refgeno
=
$OPTARG
;;
r
)
index_path
=
$OPTARG
;;
x
)
fq1
=
$OPTARG
;;
y
)
fq2
=
$OPTARG
;;
a
)
algo
=
$OPTARG
;;
...
...
@@ -30,12 +30,6 @@ if [[ -z $pair_id ]] || [[ -z $fq1 ]]; then
usage
fi
if
[
$refgeno
==
'GRCh38'
]
||
[
$refgeno
==
'GRCm38'
]
||
[
$refgeno
==
'GRCh37'
]
;
then
index_path
=
/project/shared/bicf_workflow_ref/
${
refgeno
}
else
usage
fi
if
[[
-z
$SLURM_CPUS_ON_NODE
]]
then
SLURM_CPUS_ON_NODE
=
1
...
...
@@ -48,7 +42,7 @@ then
else
bwa mem
-M
-t
$SLURM_CPUS_ON_NODE
-R
"@RG
\t
ID:
${
pair_id
}
\t
LB:tx
\t
PL:illumina
\t
PU:barcode
\t
SM:
${
pair_id
}
"
${
index_path
}
/genome.fa
${
fq1
}
${
fq2
}
>
out.sam
fi
if
[
$
refgeno
==
'
GRCh38'
]
if
[
[
$
index_path
==
'/project/shared/bicf_workflow_ref/
GRCh38'
]
]
then
cat
out.sam | k8 /cm/shared/apps/bwakit/0.7.15/bwa-postalt.js
-p
${
pair_id
}
.hla
${
index_path
}
/genome.fa.alt | samtools view
-1
-
>
output.unsort.bam
run-HLA
${
pair_id
}
.hla
>
${
pair_id
}
.hla.top 2>
${
pair_id
}
.log.hla
...
...
@@ -59,7 +53,7 @@ else
fi
samtools
sort
--threads
$SLURM_CPUS_ON_NODE
-o
output.dups.bam output.unsort.bam
samtools view
-h
output.unsort.bam | samblaster
-M
-a
--excludeDups
--addMateTags
--maxSplitCount
2
--minNonOverlap
20
-d
discordants.sam
-s
splitters.sam
>
temp.sam
gawk
'{ if (
\
$0~"^@") { print; next } else {
\
$10="*";
\
$11="*"; print } }'
OFS
=
"
\
\
t"
splitters.sam | samtools view
-S
-b
- | samtools
sort
-o
${
pair_id
}
.splitters.bam -
gawk
'{ if (
\
$0~"^@") { print; next } else {
\
$10="*";
\
$11="*"; print } }'
OFS
=
"
\
\
t"
discordants.sam | samtools view
-S
-b
- | samtools
sort
-o
${
pair_id
}
.discordants.bam -
java
-Djava
.io.tmpdir
=
./
-Xmx4g
-jar
\
$
PICARD/picard.jar FixMateInformation
ASSUME_SORTED
=
TRUE
SORT_ORDER
=
coordinate
ADD_MATE_CIGAR
=
TRUE
I
=
output.dups.bam
O
=
${
pair_id
}
.bam
gawk
'{ if ($0~"^@") { print; next } else { $10="*"; $11="*"; print } }'
OFS
=
"
\t
"
splitters.sam | samtools view
-S
-b
- | samtools
sort
-o
${
pair_id
}
.splitters.bam -
gawk
'{ if ($0~"^@") { print; next } else { $10="*"; $11="*"; print } }'
OFS
=
"
\t
"
discordants.sam | samtools view
-S
-b
- | samtools
sort
-o
${
pair_id
}
.discordants.bam -
java
-Djava
.io.tmpdir
=
./
-Xmx4g
-jar
$PICARD
/picard.jar FixMateInformation
ASSUME_SORTED
=
TRUE
SORT_ORDER
=
coordinate
ADD_MATE_CIGAR
=
TRUE
I
=
output.dups.bam
O
=
${
pair_id
}
.bam
samtools index -@
$SLURM_CPUS_ON_NODE
${
pair_id
}
.bam
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