Skip to content

Commit

Permalink
Merge dd98198 into e510305
Browse files Browse the repository at this point in the history
  • Loading branch information
ramprasadn committed Aug 22, 2021
2 parents e510305 + dd98198 commit 2bc069d
Show file tree
Hide file tree
Showing 7 changed files with 465 additions and 34 deletions.
2 changes: 2 additions & 0 deletions definitions/rd_dna_initiation_map.yaml
Expand Up @@ -18,6 +18,8 @@ CHAIN_ALL:
- CHAIN_TCOV:
- tiddit_coverage
- chromograph_cov
- CHAIN_MTDEL:
- mitodel
- CHAIN_SBCOV:
- sambamba_depth
- CHAIN_SMN:
Expand Down
12 changes: 12 additions & 0 deletions definitions/rd_dna_parameters.yaml
Expand Up @@ -175,6 +175,7 @@ recipe_core_number:
gzip_fastq: 0
manta: 36
markduplicates: 13
mitodel: 1
mt_annotation: 1
multiqc_ar: 1
peddy_ar: 4
Expand Down Expand Up @@ -240,6 +241,7 @@ recipe_memory:
gatk_variantrecalibration: 30
glnexus_merge: 10
markduplicates: 10
mitodel: 2
mt_annotation: 2
picardtools_collecthsmetrics: 8
picardtools_collectmultiplemetrics: 8
Expand Down Expand Up @@ -295,6 +297,7 @@ recipe_time:
gzip_fastq: 2
manta: 30
markduplicates: 20
mitodel: 2
mt_annotation: 1
multiqc_ar: 5
peddy_ar: 1
Expand Down Expand Up @@ -1533,6 +1536,15 @@ bcftools_core:
- bgzip
- tabix
type: recipe
mitodel:
analysis_mode: sample
associated_recipe:
- mip
data_type: SCALAR
default: 1
outfile_suffix: ".txt"
file_tag: _mitodel
type: recipe
mt_annotation:
analysis_mode: case
associated_recipe:
Expand Down
63 changes: 33 additions & 30 deletions lib/MIP/Program/Samtools.pm
Expand Up @@ -325,11 +325,10 @@ sub samtools_faidx {
store => \$infile_path,
strict_type => 1,
},
outfile_path => { store => \$outfile_path, strict_type => 1, },
regions_ref => { default => [], store => \$regions_ref, strict_type => 1, },
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append =>
{ store => \$stderrfile_path_append, strict_type => 1, },
outfile_path => { store => \$outfile_path, strict_type => 1, },
regions_ref => { default => [], store => \$regions_ref, strict_type => 1, },
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append => { store => \$stderrfile_path_append, strict_type => 1, },
};

check( $tmpl, $arg_href, 1 ) or croak q{Could not parse arguments!};
Expand Down Expand Up @@ -412,10 +411,8 @@ sub samtools_flagstat {

check( $tmpl, $arg_href, 1 ) or croak q{Could not parse arguments!};

my @commands = (
get_executable_base_command( { base_command => $BASE_COMMAND, } ),
qw{ flagstat }
);
my @commands =
( get_executable_base_command( { base_command => $BASE_COMMAND, } ), qw{ flagstat } );

push @commands, $infile_path;

Expand Down Expand Up @@ -484,10 +481,8 @@ sub samtools_idxstats {

check( $tmpl, $arg_href, 1 ) or croak q{Could not parse arguments!};

my @commands = (
get_executable_base_command( { base_command => $BASE_COMMAND, } ),
qw{ idxstats }
);
my @commands =
( get_executable_base_command( { base_command => $BASE_COMMAND, } ), qw{ idxstats } );

push @commands, $infile_path;

Expand Down Expand Up @@ -541,10 +536,9 @@ sub samtools_index {
store => \$infile_path,
strict_type => 1,
},
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append =>
{ store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => { store => \$stdoutfile_path, strict_type => 1, },
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append => { store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => { store => \$stdoutfile_path, strict_type => 1, },
};

check( $tmpl, $arg_href, 1 ) or croak q{Could not parse arguments!};
Expand Down Expand Up @@ -643,10 +637,9 @@ sub samtools_merge {
store => \$region,
strict_type => 1,
},
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append =>
{ store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => {
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append => { store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => {
strict_type => 1,
store => \$stdoutfile_path,
},
Expand Down Expand Up @@ -775,10 +768,9 @@ sub samtools_sort {
store => \$referencefile_path,
strict_type => 1,
},
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append =>
{ store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => {
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append => { store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => {
strict_type => 1,
store => \$stdoutfile_path,
},
Expand Down Expand Up @@ -855,6 +847,7 @@ sub samtools_stats {
## : $auto_detect_input_format => Ignored (input format is auto-detected)
## : $filehandle => Sbatch filehandle to write to
## : $infile_path => Infile path
## : $insert_size => Maximum insert size
## : $outfile_path => Outfile path
## : $regions_ref => Regions to process {REF}
## : $remove_overlap => Remove overlaps of paired-end reads from coverage and base count computations
Expand All @@ -867,6 +860,7 @@ sub samtools_stats {
## Flatten argument(s)
my $filehandle;
my $infile_path;
my $insert_size;
my $outfile_path;
my $regions_ref;
my $stderrfile_path;
Expand All @@ -891,18 +885,22 @@ sub samtools_stats {
store => \$infile_path,
strict_type => 1,
},
insert_size => {
allow => qr/ ^\d+$ /sxm,
store => \$insert_size,
strict_type => 1,
},
outfile_path => { store => \$outfile_path, strict_type => 1, },
remove_overlap => {
allow => [ undef, 0, 1 ],
default => 1,
store => \$remove_overlap,
strict_type => 1,
},
regions_ref => { default => [], store => \$regions_ref, strict_type => 1, },
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append =>
{ store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => {
regions_ref => { default => [], store => \$regions_ref, strict_type => 1, },
stderrfile_path => { store => \$stderrfile_path, strict_type => 1, },
stderrfile_path_append => { store => \$stderrfile_path_append, strict_type => 1, },
stdoutfile_path => {
strict_type => 1,
store => \$stdoutfile_path,
},
Expand All @@ -918,6 +916,11 @@ sub samtools_stats {
push @commands, q{-s};
}

if ($insert_size) {

push @commands, q{--insert-size} . $SPACE . $insert_size;
}

if ($remove_overlap) {

push @commands, q{--remove-overlaps};
Expand Down

0 comments on commit 2bc069d

Please sign in to comment.