Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RAHMA_SCRIPTS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
Dr. Mohamed Mohamed Hefny Salim
RAHMA_SCRIPTS
Commits
045957fc
Commit
045957fc
authored
4 years ago
by
Dr. Mohamed Mohamed Hefny Salim
Browse files
Options
Downloads
Patches
Plain Diff
firt script
parents
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trim_and_compare.sh
+71
-0
71 additions, 0 deletions
Trim_and_compare.sh
with
71 additions
and
0 deletions
Trim_and_compare.sh
0 → 100755
+
71
−
0
View file @
045957fc
#!/bin/bash
################################################################################
# TrimAndCompare #
# #
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Place a short #
# description of the script here. #
# #
# Copyright (C) 2020 Rahma Amen (Potsdam University) #
# LinuxGeek46@both.org #
# #
# Change History #
# 16/07/2020 Rahma Amen created the script (inspired from Johanna Krger) #
# #
# #
################################################################################
######
### Trimming
######
ODIR
=
/home/mohamed/work/RAHMA/Analysis/
IDIR
=
/home/mohamed/work/RAHMA/RUN/
fqcdir
=
/home/mohamed/work/RAHMA/fastqc_analysis/
#ODIR=/home/bsdb2425/Rahma/temp/trimmed_capture-v1/
#IDIR=/home/bsdb2425/Rahma/temp/
ADAPTER_FWD
=
AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG
ADAPTER_REV
=
TTACTATGCCGCTGGTGGCTCTAGATGTGNNNNNNNTGTGAGAAAGGGATGTGCTGCGAGAAGG
TSeqfile
=
/home/mohamed/work/RAHMA/fastqc_analysis/TotalSeq_report
mkdir
-p
$ODIR
mkdir
-p
$fqcdir
#for file in `ls $INDIR/*R1*.fastq`
for
fastqf
in
$IDIR
/
*
R1_001.fastq.gz
do
# file stem (without extension or path)
fstem
=
$(
echo
$fastqf
|
sed
's/.*\///'
|
sed
's/1_001.fastq.gz//'
)
# fastq file names (original and trimmed)
f1o
=
$IDIR$fstem
"1_001.fastq.gz"
f1t
=
$ODIR$fstem
"1_001_trimmed.fastq.gz"
f2o
=
$IDIR$fstem
"2_001.fastq.gz"
f2t
=
$ODIR$fstem
"2_001_trimmed.fastq.gz"
cutadapt
-a
$ADAPTER_FWD
-A
$ADAPTER_REV
-q
20
-m
30
-o
$f1t
-p
$f2t
$f1o
$f2o
# fastqc for all files
fastqc
--extract
--outdir
=
$fqcdir
$f1o
$f2o
$f1t
$f2t
# fastqc --extract --outdir=$fqcdir $f1o $f1t
# remove zip files
rm
$fqcdir
/
$fstem
*
.zip
f1oqc
=
$fqcdir$fstem
"1_001_fastqc/fastqc_data.txt"
TotalSeq1o
=
`
grep
"Total Seq"
$f1oqc
|
sed
's/Total Sequences //'
`
echo
$TotalSeq1o
f1tqc
=
$fqcdir$fstem
"1_001_trimmed_fastqc/fastqc_data.txt"
TotalSeq1t
=
`
grep
"Total Seq"
$f1tqc
|
sed
's/Total Sequences //'
`
echo
$TotalSeq1t
f2oqc
=
$fqcdir$fstem
"2_001_fastqc/fastqc_data.txt"
TotalSeq2o
=
`
grep
"Total Seq"
$f2oqc
|
sed
's/Total Sequences //'
`
f2tqc
=
$fqcdir$fstem
"2_001_trimmed_fastqc/fastqc_data.txt"
TotalSeq2t
=
`
grep
"Total Seq"
$f2tqc
|
sed
's/Total Sequences //'
`
echo
"
${
fstem
}
1_001:
$TotalSeq1o
$TotalSeq1t
"
>
$TSeqfile
echo
"
${
fstem
}
2_001:
$TotalSeq2o
$TotalSeq2t
"
>>
$TSeqfile
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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