Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ngs_tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
bioinfo
ngs_tools
Commits
b2618dd9
Commit
b2618dd9
authored
9 years ago
by
Holger Brandl
Browse files
Options
Downloads
Patches
Plain Diff
continued star wrapper
parent
80340742
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dge_workflow/dge_utils.sh
+1
-1
1 addition, 1 deletion
dge_workflow/dge_utils.sh
dge_workflow/star_align.sh
+26
-18
26 additions, 18 deletions
dge_workflow/star_align.sh
with
27 additions
and
19 deletions
dge_workflow/dge_utils.sh
+
1
−
1
View file @
b2618dd9
...
@@ -165,7 +165,7 @@ wait4jobs .tophatjobs
...
@@ -165,7 +165,7 @@ wait4jobs .tophatjobs
dge_bam_correlate
.
dge_bam_correlate
.
&
## create tophat mapping report
## create tophat mapping report
spin.R
${
NGS_TOOLS
}
/dge_workflow/tophat_qc.R
.
spin.R
${
NGS_TOOLS
}
/dge_workflow/tophat_qc.R
.
...
...
This diff is collapsed.
Click to expand it.
dge_workflow/star_align.sh
+
26
−
18
View file @
b2618dd9
...
@@ -5,14 +5,23 @@
...
@@ -5,14 +5,23 @@
usage
=
'
usage
=
'
Use star to align fastq files against a genome
Use star to align fastq files against a genome
Usage: star_align.sh <igenome> <fastq_files>
...
Usage: star_align.sh <igenome> <fastq_files>
Options:
Options:
-c Cache results
'
'
#-c Cache results
eval
$(
echo
"
$usage
"
| ~/bin/docopts/docopts
-h
-
-A
dopts :
"
$@
"
)
#eval $(echo "$usage" | ~/bin/docopts/docopts -h - -A dopts : "$@")
#eval $(echo "$usage" | ~/bin/docopts/docopts -h - : /projects/bioinfo/igenomes/Mus_musculus/Ensembl/GRCm38 /projects/bioinfo/holger/projects/florio_11b_2nd_batch/lanereps_pooled/arhgap11b_1.fastq.gz)
#echo "$usage" | ~/bin/docopts/docopts -h - : "$@"
#echo "$usage" | ~/bin/docopts/docopts -h - : "hallo dfds"
#eval $(echo $usage | ~/bin/docopts/docopts -h - : "$@")
#eval(exit 64)
eval
"
$(
echo
"
$usage
"
| ~/bin/docopts/docopts
-h
- :
"
$@
"
)
"
# v0.7 style
#eval $(echo "$usage" | /home/brandl/bin/docopts_v0.7/docopts "hallo")
#eval "$(echo "$usage" | ~/bin/docopts/docopts -h - : /projects/bioinfo/igenomes/Mus_musculus/Ensembl/GRCm38 /projects/bioinfo/holger/projects/florio_11b_2nd_batch/lanereps_pooled/arhgap11b_1.fastq.gz)"
#for fastqFile in ${fastq_files[@]} ; do
#for fastqFile in ${fastq_files[@]} ; do
# echo processing $fastqFile
# echo processing $fastqFile
...
@@ -21,34 +30,33 @@ eval $(echo "$usage" | ~/bin/docopts/docopts -h - -A dopts : "$@")
...
@@ -21,34 +30,33 @@ eval $(echo "$usage" | ~/bin/docopts/docopts -h - -A dopts : "$@")
#echo $igenome
#echo $igenome
## build index if not present
fastqFiles
=
${
fastq_files
[@]
}
#echo $fastqFiles
export
star_index
=
"
${
igenome
}
/Sequence/StarIndex"
export
star_index
=
"
$igenome
/Sequence/StarIndex/genome"
export
gtfFile
=
"
$igenome
/Annotation/Genes/genes.gtf"
export
gtfFile
=
"
$igenome
/Annotation/Genes/genes.gtf"
head
$gtfFile
#
head $gtfFile
if
[
!
-f
$gtfFile
]
;
then
if
[
!
-f
$gtfFile
]
;
then
>
&2
echo
"gtf '
$gtfFile
' does not exis"
;
exit
1
;
>
&2
echo
"gtf '
$gtfFile
' does not exis"
;
exit
1
;
fi
fi
## basic
## basic
usage tutorial
#http://www.homolog.us/blogs/blog/2012/11/02/star-really-kick-ass-rna-seq-aligner/
#http://www.homolog.us/blogs/blog/2012/11/02/star-really-kick-ass-rna-seq-aligner/
if
!
-d
"
${
igenome
}
/Sequence/StarIndex"
]
;
then
## build index if not present
if
!
-d
"
${
star_index
}
"
]
;
then
mailme
"
${
project
}
: creating STAR index for
$igenome
"
mailme
"
${
project
}
: creating STAR index for
$igenome
"
mkdir
${
igenome
}
/Sequence/S
tar
I
ndex
mkdir
${
s
tar
_i
ndex
}
cmd
=
"STAR --runMode genomeGenerate --genomeDir
${
igenome
}
/Sequence/S
tar
I
ndex --genomeFastaFiles
${
igenome
}
/Sequence/WholeGenomeFasta/genome.fa --runThreadN 10"
cmd
=
"STAR --runMode genomeGenerate --genomeDir
${
s
tar
_i
ndex
}
--genomeFastaFiles
${
igenome
}
/Sequence/WholeGenomeFasta/genome.fa --runThreadN 10"
#eval $cmd
#eval $cmd
#STAR --runMode genomeGenerate --genomeDir ${
igenome}/Sequence/S
tar
I
ndex --genomeFastaFiles ${igenome}/Sequence/Chromosomes/*.fa --runThreadN 10
#STAR --runMode genomeGenerate --genomeDir ${
s
tar
_i
ndex
}
--genomeFastaFiles ${igenome}/Sequence/Chromosomes/*.fa --runThreadN 10
mysub
"
${
project
}
_star_index"
"
$cmd
"
-n
5
-R
span[hosts
=
1]
-q
medium | blockScript
mysub
"
${
project
}
_star_index"
"
$cmd
"
-n
5
-R
span[hosts
=
1]
-q
medium | blockScript
## prevent modification
## prevent modification
chmod
-R
-w
${
igenome
}
/Sequence/StarIndex
chmod
-R
-w
${
star_index
}
fi
fi
...
@@ -70,7 +78,7 @@ ll $fastqFiles
...
@@ -70,7 +78,7 @@ ll $fastqFiles
for
fastqFile
in
$fastqFiles
;
do
for
fastqFile
in
$fastqFiles
;
do
echo
"submitting tophat job for
$fastqFile
"
echo
"submitting tophat job for
$fastqFile
"
# DEBUG fastqFile=/projects/bioinfo/holger/projects/
helin/mouse/trimmed/mouse_big_cyst_rep4_ca
.fastq.gz
# DEBUG fastqFile=/projects/bioinfo/holger/projects/
florio_11b_2nd_batch/lanereps_pooled/arhgap11b_1
.fastq.gz
fastqBaseName
=
$(
basename
${
fastqFile
%%.fastq.gz
}
)
fastqBaseName
=
$(
basename
${
fastqFile
%%.fastq.gz
}
)
outputdir
=
$fastqBaseName
outputdir
=
$fastqBaseName
...
@@ -80,7 +88,7 @@ for fastqFile in $fastqFiles ; do
...
@@ -80,7 +88,7 @@ for fastqFile in $fastqFiles ; do
## note --outSAMstrandField intronMotif is required for cuffdiff compatiblity (xs flag)
## note --outSAMstrandField intronMotif is required for cuffdiff compatiblity (xs flag)
mysub
"
${
project
}
__star__
${
fastqBaseName
}
"
"
mysub
"
${
project
}
__star__
${
fastqBaseName
}
"
"
# tophat -p6 -G
$gtfFile
-g1 -o
$outputdir
$bowtie_gindex
$fastqFile
# tophat -p6 -G
$gtfFile
-g1 -o
$outputdir
$bowtie_gindex
$fastqFile
STAR --genomeDir
$star_index
--readFilesIn
/path/to/read1
$fastqFile
--runThreadN 6 --outFileNamePrefix
$fastqBaseName
--outSAMtype BAM SortedByCoordinate --outSAMstrandField intronMotif --sjdbGTFfile
STAR --genomeDir
$star_index
--readFilesIn
$fastqFile
--runThreadN 6
--readFilesCommand zcat
--outFileNamePrefix
$fastqBaseName
--outSAMtype BAM SortedByCoordinate --outSAMstrandField intronMotif --sjdbGTFfile
$gtfFile
"
-n
5
-R
span[hosts
=
1]
-q
long | joblist .tophatjobs
"
-n
5
-R
span[hosts
=
1]
-q
long | joblist .tophatjobs
done
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