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
3090fd6a
Commit
3090fd6a
authored
7 years ago
by
Brandi Cantarel
Browse files
Options
Downloads
Patches
Plain Diff
options trimgalore
parent
ba09efe0
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
preproc_fastq/trimgalore.sh
+28
-5
28 additions, 5 deletions
preproc_fastq/trimgalore.sh
with
28 additions
and
5 deletions
preproc_fastq/trimgalore.sh
+
28
−
5
View file @
3090fd6a
#!/bin/bash
#trimgalore.sh
pair_id
=
$1
read1
=
$2
read2
=
$3
usage
()
{
echo
"-h Help documentation for hisat.sh"
echo
"-a --FastQ R1"
echo
"-b --FastQ R2"
echo
"-p --Prefix for output file name"
echo
"Example: bash trimgalore.sh -p prefix -a SRR1551047_1.fastq.gz -b SRR1551047_2.fastq.gz"
exit
1
}
OPTIND
=
1
# Reset OPTIND
while
getopts
:a:b:p:h opt
do
case
$opt
in
a
)
fq1
=
$OPTARG
;;
b
)
fq2
=
$OPTARG
;;
p
)
pair_id
=
$OPTARG
;;
h
)
usage
;;
esac
done
shift
$((
$OPTIND
-
1
))
# Check for mandatory options
if
[[
-z
$pair_id
]]
||
[[
-z
$fq1
]]
;
then
usage
fi
r1base
=
"
${
r1
%.fastq*
}
"
r2base
=
"
${
r2
%.fastq*
}
"
module load trimgalore/0.4.1 cutadapt/1.9.1
if
[
$R1
==
$R2
]
then
trim_galore
-q
25
--illumina
--gzip
--length
35
${
read
1
}
trim_galore
-q
25
--illumina
--gzip
--length
35
${
fq
1
}
mv
${
r1base
}
_trimmed.fq.gz
${
pair_id
}
.trim.R1.fastq.gz
cp
${
pair_id
}
.trim.R1.fastq.gz
${
pair_id
}
.trim.R2.fastq.gz
else
trim_galore
--paired
-q
25
--illumina
--gzip
--length
35
${
read
1
}
${
read
2
}
trim_galore
--paired
-q
25
--illumina
--gzip
--length
35
${
fq
1
}
${
fq
2
}
mv
${
r1base
}
_val_1.fq.gz
${
pair_id
}
.trim.R1.fastq.gz
mv
${
r2base
}
_val_2.fq.gz
${
pair_id
}
.trim.R2.fastq.gz
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