Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mirflowz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
zavolan_group
pipelines
mirflowz
Commits
6a49c7d5
Commit
6a49c7d5
authored
2 years ago
by
Iris Mestres Pascual
Browse files
Options
Downloads
Patches
Plain Diff
refactor: use local annotation file
parent
9a2662c5
No related branches found
No related tags found
1 merge request
!26
refactor: use local files for genome resources
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/filter_anno_gtf.sh
+9
-22
9 additions, 22 deletions
scripts/filter_anno_gtf.sh
with
9 additions
and
22 deletions
scripts/filter_anno_gtf.sh
+
9
−
22
View file @
6a49c7d5
...
...
@@ -24,18 +24,16 @@ log_dir="$2"
# Paths (DO NOT CHANGE!) #Modified by Iborra P
root
=
"
$PWD
"
resDir
=
"
${
root
}
/
${
output_dir
}
"
raw
Dir
=
"
${
r
esDir
}
/raw
"
file
Dir
=
"
${
r
oot
}
/test_files
"
tmpDir
=
"
${
root
}
/.tmp"
logDir
=
"
${
root
}
/
${
log_dir
}
"
#
URLs
#
Annotation file
# ----
# - All URLs variables represent Bash arrays, so that multiple URLs can be provided; in that case,
# files are concatenated after download
# - It is assumed that the specified transcriptome files contain sequences for all transcripts in
# the (filtered) gene annotations
geneAnno
URLs
=
"
$3
"
#Modified by Iborra P
geneAnno
File
=
"
$3
"
# Filters
# -------
...
...
@@ -65,7 +63,6 @@ set -o pipefail
# Create directories
mkdir
--parents
"
$resDir
"
mkdir
--parents
"
$rawDir
"
mkdir
--parents
"
$tmpDir
"
# Create log file
...
...
@@ -78,25 +75,14 @@ rm -fr "$logFile"; touch "$logFile"
### MAIN ###
##############
## GET & FILTER GENE ANNOTATIONS
# Get gene annotation files
echo
"Downloading gene annotations..."
>>
"
$logFile
"
for
url
in
"
${
geneAnnoURLs
[@]
}
"
;
do
wget
"
$url
"
--output-document
"
${
rawDir
}
/
$(
basename
"
$url
"
)
"
&> /dev/null
done
# Concatenate gene annotation files
echo
"Concatenating gene annotation files..."
>>
"
$logFile
"
geneAnno
=
"
${
resDir
}
/gene_annotations.gtf.gz"
for
url
in
"
${
geneAnnoURLs
[@]
}
"
;
do
cat
"
${
rawDir
}
/
$(
basename
"
$url
"
)
"
>>
"
$geneAnno
"
done
## FILTER GENE ANNOTATIONS
# Filter gene annotations
geneAnnoFilt
=
"
${
resDir
}
/gene_annotations.filtered.gtf.gz"
geneAnnoOut
=
"
${
resDir
}
/gene_annotations.filtered.gtf"
geneAnnoFiltTmp
=
"
${
tmpDir
}
/gene_annotations.filtered.gtf.gz.tmp"
geneAnno
=
"
${
resDir
}
/gene_annotations.gtf.gz"
cp
"
$geneAnnoFile
"
"
$geneAnno
"
cp
"
$geneAnno
"
"
$geneAnnoFiltTmp
"
# Filter requested chromosomes
...
...
@@ -142,11 +128,12 @@ cp "$geneAnno" "$geneAnnoFiltTmp"
rm
"
${
resDir
}
/gene_annotations.filtered.gtf.gz"
rm
"
${
resDir
}
/gene_annotations.gtf.gz"
#############
### END ###
#############
echo
"Original data in:
$
raw
Dir
"
>>
"
$logFile
"
echo
"Original data in:
$
file
Dir
"
>>
"
$logFile
"
echo
"Processed data in:
$resDir
"
>>
"
$logFile
"
echo
"Done. No errors."
>>
"
$logFile
"
>
&2
echo
"Done. No errors."
>
&2
echo
"Done. No errors."
\ No newline at end of file
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