Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
c4be5af4
Commit
c4be5af4
authored
Oct 09, 2013
by
Penom Nom
Browse files
Add option to delete bams.
parent
53a98dca
Changes
8
Hide whitespace changes
Inline
Side-by-side
workflows/casava_qc/__init__.py
View file @
c4be5af4
...
...
@@ -107,7 +107,7 @@ class CasavaQualityCheck (NG6Workflow):
sample_lane_prefixes
=
None
if
group_prefix
is
not
None
:
sample_lane_prefixes
=
(
Utils
.
get_group_basenames
(
filtered_read1_files
+
filtered_read2_files
,
"lane"
)).
keys
()
bwa
=
self
.
add_component
(
"BWA"
,
[
indexed_ref
,
filtered_read1_files
,
filtered_read2_files
,
sample_lane_prefixes
],
parent
=
fastqilluminafilter
)
bwa
=
self
.
add_component
(
"BWA"
,
[
indexed_ref
,
filtered_read1_files
,
filtered_read2_files
,
sample_lane_prefixes
,
"aln"
,
not
self
.
args
[
"delete_bam"
]
],
parent
=
fastqilluminafilter
)
# make some statistic on the alignement
alignmentstats
=
self
.
add_component
(
"AlignmentStats"
,
[
bwa
.
bam_files
,
is_paired_end
,
False
],
parent
=
bwa
)
...
...
workflows/casava_qc/workflow.properties
View file @
c4be5af4
...
...
@@ -72,6 +72,11 @@ keep_reads.help = Keep reads which pass the Illumina filters or keep reads which
keep_reads.default
=
pass_illumina_filters
keep_reads.choices
=
pass_illumina_filters|not_pass_illumina_filters|all
delete_bam
=
delete_bam
delete_bam.flag
=
--delete-bam
delete_bam.help
=
The BAM are not stored.
delete_bam.default
=
False
histogram_width.name
=
histogram_width
histogram_width.flag
=
--histogram_width
histogram_width.help
=
Explicitly sets the histogram width, overriding automatic truncation of histogram tail.
...
...
workflows/components/bwa.py
View file @
c4be5af4
...
...
@@ -31,7 +31,7 @@ from weaver.abstraction import Map
class
BWA
(
Analysis
):
def
define_parameters
(
self
,
reference_genome
,
read1
,
read2
=
None
,
group_prefix
=
None
,
algorithm
=
"aln"
):
def
define_parameters
(
self
,
reference_genome
,
read1
,
read2
=
None
,
group_prefix
=
None
,
algorithm
=
"aln"
,
keep_bam
=
True
):
self
.
read1
=
InputFileList
(
read1
,
Formats
.
FASTQ
)
self
.
read2
=
None
if
algorithm
==
"aln"
:
...
...
@@ -55,6 +55,7 @@ class BWA (Analysis):
self
.
group_prefix
=
group_prefix
self
.
algorithm
=
algorithm
self
.
keep_bam
=
keep_bam
self
.
reference_genome
=
InputFile
(
reference_genome
)
#################################PATCH############################################
self
.
source_file
=
reference_genome
+
"_source"
...
...
@@ -75,8 +76,9 @@ class BWA (Analysis):
##################################################################################
def
post_process
(
self
):
# Finally create and add the archive to the analysis
self
.
_save_files
(
self
.
bam_files
)
if
self
.
keep_bam
:
# Finally create and add the archive to the analysis
self
.
_save_files
(
self
.
bam_files
)
def
get_version
(
self
):
cmd
=
[
self
.
get_exec_path
(
"bwa"
)]
...
...
workflows/illumina_qc/__init__.py
View file @
c4be5af4
...
...
@@ -107,7 +107,7 @@ class IlluminaQualityCheck (NG6Workflow):
sample_lane_prefixes
=
None
if
group_prefix
is
not
None
:
sample_lane_prefixes
=
(
Utils
.
get_group_basenames
(
filtered_read1_files
+
filtered_read2_files
,
"lane"
)).
keys
()
bwa
=
self
.
add_component
(
"BWA"
,
[
indexed_ref
,
filtered_read1_files
,
filtered_read2_files
,
sample_lane_prefixes
],
parent
=
fastqilluminafilter
)
bwa
=
self
.
add_component
(
"BWA"
,
[
indexed_ref
,
filtered_read1_files
,
filtered_read2_files
,
sample_lane_prefixes
,
"aln"
,
not
self
.
args
[
"delete_bam"
]
],
parent
=
fastqilluminafilter
)
# make some statistic on the alignement
alignmentstats
=
self
.
add_component
(
"AlignmentStats"
,
[
bwa
.
bam_files
,
is_paired_end
,
True
],
parent
=
bwa
)
...
...
workflows/illumina_qc/workflow.properties
View file @
c4be5af4
...
...
@@ -72,6 +72,11 @@ keep_reads.help = Keep reads which pass the Illumina filters or keep reads which
keep_reads.default
=
pass_illumina_filters
keep_reads.choices
=
pass_illumina_filters|not_pass_illumina_filters|all
delete_bam
=
delete_bam
delete_bam.flag
=
--delete-bam
delete_bam.help
=
The BAM are not stored.
delete_bam.default
=
False
histogram_width.name
=
histogram_width
histogram_width.flag
=
--histogram_width
histogram_width.help
=
Explicitly sets the histogram width, overriding automatic truncation of histogram tail.
...
...
workflows/illumina_rnaseq/__init__.py
View file @
c4be5af4
...
...
@@ -105,7 +105,7 @@ class RnaSeqQualityCheck (NG6Workflow):
sample_lane_prefixes
=
None
if
group_prefix
is
not
None
:
sample_lane_prefixes
=
(
Utils
.
get_group_basenames
(
filtered_read1_files
+
filtered_read2_files
,
"lane"
)).
keys
()
bwa
=
self
.
add_component
(
"BWA"
,
[
indexed_ref
,
filtered_read1_files
,
filtered_read2_files
,
sample_lane_prefixes
],
parent
=
fastqilluminafilter
)
bwa
=
self
.
add_component
(
"BWA"
,
[
indexed_ref
,
filtered_read1_files
,
filtered_read2_files
,
sample_lane_prefixes
,
"aln"
,
not
self
.
args
[
"delete_bam"
]
],
parent
=
fastqilluminafilter
)
# make some statistic on the alignement
alignmentstats
=
self
.
add_component
(
"AlignmentStats"
,
[
bwa
.
bam_files
,
is_paired_end
],
parent
=
bwa
,
component_prefix
=
"bwa"
)
...
...
@@ -129,7 +129,7 @@ class RnaSeqQualityCheck (NG6Workflow):
concat_read2_files
=
filtered_read2_files
concat_read1_files
=
sorted
(
concat_read1_files
)
concat_read2_files
=
sorted
(
concat_read2_files
)
tophat
=
self
.
add_component
(
"TopHat"
,
[
indexed_ref
,
concat_read1_files
,
concat_read2_files
],
parent
=
fastqilluminafilter
)
tophat
=
self
.
add_component
(
"TopHat"
,
[
indexed_ref
,
concat_read1_files
,
concat_read2_files
,
"25000"
,
"6"
,
not
self
.
args
[
"delete_bam"
]
],
parent
=
fastqilluminafilter
)
# make some statistic on the alignement
alignmentstats
=
self
.
add_component
(
"AlignmentStats"
,
[
tophat
.
bam_files
,
is_paired_end
],
parent
=
tophat
,
component_prefix
=
"tophat"
)
...
...
workflows/illumina_rnaseq/components/tophat.py
View file @
c4be5af4
...
...
@@ -32,7 +32,7 @@ from ng6.utils import Utils
class
TopHat
(
Analysis
):
def
define_parameters
(
self
,
index_ref_genome
,
read1
,
read2
,
max_intron_length
=
"25000"
,
nb_threads
=
"6"
,
archive_name
=
None
):
def
define_parameters
(
self
,
index_ref_genome
,
read1
,
read2
,
max_intron_length
=
"25000"
,
nb_threads
=
"6"
,
keep_bam
=
True
,
archive_name
=
None
):
self
.
read1
=
InputFileList
(
read1
,
Formats
.
FASTQ
)
self
.
read2
=
None
...
...
@@ -55,6 +55,7 @@ class TopHat (Analysis):
self
.
max_intron_length
=
max_intron_length
self
.
nb_threads
=
nb_threads
self
.
keep_bam
=
keep_bam
def
define_analysis
(
self
):
self
.
name
=
"TopHat Alignment"
...
...
@@ -63,8 +64,9 @@ class TopHat (Analysis):
self
.
options
=
self
.
max_intron_length
+
" "
+
self
.
nb_threads
def
post_process
(
self
):
# Finally create and add the archive to the analysis
self
.
_save_files
(
self
.
bam_files
)
if
self
.
keep_bam
:
# Finally create and add the archive to the analysis
self
.
_save_files
(
self
.
bam_files
)
def
get_version
(
self
):
cmd
=
[
self
.
get_exec_path
(
"tophat2"
),
"-v"
]
...
...
workflows/illumina_rnaseq/workflow.properties
View file @
c4be5af4
...
...
@@ -55,6 +55,11 @@ keep_reads.help = Keep reads which pass the Illumina filters or keep reads which
keep_reads.default
=
pass_illumina_filters
keep_reads.choices
=
pass_illumina_filters|not_pass_illumina_filters|all
delete_bam
=
delete_bam
delete_bam.flag
=
--delete-bam
delete_bam.help
=
The BAM are not stored.
delete_bam.default
=
False
compression.name
=
compression
compression.flag
=
--compression
compression.help
=
How should data be compressed once archived (none|gz|bz2)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment