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
a7dd8838
Commit
a7dd8838
authored
4 years ago
by
Dr. Mohamed Mohamed Hefny Salim
Browse files
Options
Downloads
Patches
Plain Diff
add analysis_kraken script
parent
469bf4d1
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
STOMACH_ANALYSIS/analysis_kraken.sh
+52
-0
52 additions, 0 deletions
STOMACH_ANALYSIS/analysis_kraken.sh
with
52 additions
and
0 deletions
STOMACH_ANALYSIS/analysis_kraken.sh
0 → 100644
+
52
−
0
View file @
a7dd8838
#!/bin/bash
################################################################################
# analysis_kraken #
# #
# Script for taxonomic sequence classification of the using kraken #
# #
# #
# description: to be added #
# #
# Copyright (C) 2020 Rahma Amen (Potsdam University) #
# amen@uni-potsdam.de #
# #
# Change History #
# 29/10/2020 Rahma Amen created the script #
# #
# ToDo: #
# - Use kraken2 #
# #
################################################################################
## Define in/out folders and variables
DBNAME
=
/mnt/scratch/mathnat/ibb/amen/STOMACH_ANALYSIS/TEST_ANALYSIS/DATABASE_KRAKEN/
DATA_TRIMMED
=
/mnt/scratch/mathnat/ibb/amen/STOMACH_ANALYSIS/TEST_ANALYSIS/DATA_TRIMMED
OUT_DIR
=
/mnt/scratch/mathnat/ibb/amen/STOMACH_ANALYSIS/TEST_ANALYSIS/KRAKEN_ANALYSIS/
## Creat custom database
# to be written
# http://ccb.jhu.edu/software/kraken/MANUAL.html#custom-databases
#
# Temporary fix for people using conda's version of kraken or kraken2: Run these commands prior to kraken-build --db . --download-taxonomy:
# wget ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/nucl_gb.accession2taxid.gz
# wget ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/nucl_wgs.accession2taxid.gz
# touch accmap.dlflag
# and put those files into the "taxonomy" folder
#
for
fR
in
$DATA_TRIMMED
/
*
R1_001_trimmed.fastq.gz
do
# file stem (without extension or path)
fstem
=
$(
echo
$fR
|
sed
's/.*\///'
|
sed
's/1_001_trimmed.fastq.gz//'
)
fR1
=
$DATA_TRIMMED
/
$fstem
"1_001_trimmed.fastq.gz"
fR2
=
$DATA_TRIMMED
/
$fstem
"2_001_trimmed.fastq.gz"
fout
=
$OUT_DIR$fstem
"_kraken"
frep
=
$OUT_DIR$fstem
"_report"
ftrn
=
$OUT_DIR$fstem
"_translate"
kraken
--paired
$fR1
$fR2
--db
$DBNAME
>
$fout
kraken-report
$fout
--db
$DBNAME
>
$frep
kraken-translate
$fout
--db
$DBNAME
>
$ftrn
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