Skip to content

Commit

Permalink
Merge f4ee825 into ec1d691
Browse files Browse the repository at this point in the history
  • Loading branch information
ramprasadn committed Jan 8, 2021
2 parents ec1d691 + f4ee825 commit e4022ea
Show file tree
Hide file tree
Showing 18 changed files with 1,419 additions and 71 deletions.
1 change: 1 addition & 0 deletions definitions/install_parameters.yaml
Expand Up @@ -73,6 +73,7 @@ rd_dna:
- cnvnator
- cyrius
- deepvariant
- deeptrio
- delly
- expansionhunter
- fastqc
Expand Down
1 change: 1 addition & 0 deletions definitions/rd_dna_initiation_map.yaml
Expand Up @@ -55,6 +55,7 @@ CHAIN_ALL:
- PARALLEL:
- CHAIN_DEEPVAR:
- deepvariant
- deeptrio
- glnexus_merge
- GATK_HAPLOTYPECALLER:
- gatk_haplotypecaller
Expand Down
15 changes: 15 additions & 0 deletions definitions/rd_dna_parameters.yaml
Expand Up @@ -83,6 +83,7 @@ gpu_capable_executables:
data_type: ARRAY
default:
- run_deepvariant
- run_deeptrio
- call_variants
type: mip
## HumanGenomeReference
Expand Down Expand Up @@ -150,6 +151,7 @@ recipe_core_number:
chromograph_rhoviz: 1
chromograph_upd: 1
cnvnator_ar: 13
deeptrio: 36
deepvariant: 36
delly_call: 36
delly_reformat: 13
Expand Down Expand Up @@ -214,6 +216,7 @@ recipe_gpu_number:
data_type: HASH
default:
deepvariant: 1
deeptrio: 1
type: mip
set_recipe_gpu_number:
associated_recipe:
Expand Down Expand Up @@ -279,6 +282,7 @@ recipe_time:
chromograph_rhoviz: 1
chromograph_upd: 1
cnvnator_ar: 1
deeptrio: 15
deepvariant: 10
delly_call: 20
delly_reformat: 7
Expand Down Expand Up @@ -511,6 +515,17 @@ deepvariant:
program_executables:
- run_deepvariant
type: recipe
deeptrio:
analysis_mode: case
associated_recipe:
- mip
data_type: SCALAR
default: 1
file_tag: _deeptrio
outfile_suffix: ".g.vcf.gz"
program_executables:
- run_deeptrio
type: recipe
glnexus_merge:
analysis_mode: case
associated_recipe:
Expand Down
8 changes: 4 additions & 4 deletions lib/MIP/Cli/Mip/Install.pm
Expand Up @@ -131,8 +131,8 @@ sub _build_usage {
enum(
[
qw{ arriba bedtools blobfish bootstrapann bwa bwakit bwa-mem2 cadd chanjo
chromograph cnvnator cyrius deepvariant delly expansionhunter fastqc gatk gatk4
genmod gffcompare glnexus htslib manta mip mip_scripts multiqc peddy picard plink
chromograph cnvnator cyrius deeptrio deepvariant delly expansionhunter fastqc gatk
gatk4 genmod gffcompare glnexus htslib manta mip mip_scripts multiqc peddy picard plink
preseq python rhocall rseqc rtg-tools salmon sambamba smncopynumbercaller star
star-fusion stranger stringtie svdb telomerecat tiddit trim-galore ucsc upd
utilities varg vcf2cytosure vcfanno vep vts }
Expand All @@ -153,8 +153,8 @@ sub _build_usage {
enum(
[
qw{ arriba bedtools blobfish bootstrapann bwa bwakit bwa-mem2 cadd chanjo
chromograph cnvnator cyrius deepvariant delly expansionhunter fastqc gatk gatk4
genmod gffcompare glnexus htslib manta mip mip_scripts multiqc peddy picard plink
chromograph cnvnator cyrius deeptrio deepvariant delly expansionhunter fastqc gatk
gatk4 genmod gffcompare glnexus htslib manta mip mip_scripts multiqc peddy picard plink
preseq python rhocall rseqc rtg-tools salmon sambamba smncopynumbercaller star
star-fusion stranger stringtie svdb telomerecat tiddit trim-galore ucsc upd
utilities varg vcf2cytosure vcfanno vep vts }
Expand Down
58 changes: 58 additions & 0 deletions lib/MIP/Pedigree.pm
Expand Up @@ -34,6 +34,7 @@ BEGIN {
create_fam_file
get_is_trio
gatk_pedigree_flag
has_duo
has_trio
is_sample_proband_in_trio
parse_pedigree
Expand All @@ -47,6 +48,7 @@ BEGIN {
}

## Constants
Readonly my $DUO_MEMBERS_COUNT => 2;
Readonly my $TRIO_MEMBERS_COUNT => 3;

sub check_founder_id {
Expand Down Expand Up @@ -490,6 +492,62 @@ sub get_is_trio {
return;
}

sub has_duo {

## Function : Check if case has a parent-child duo and child is affected
## Returns : 0 | 1
## Arguments : $active_parameter_href => Active parameters for this analysis hash {REF}
## : $sample_info_href => Info on samples and case hash {REF}

my ($arg_href) = @_;

## Flatten argument(s)
my $active_parameter_href;
my $sample_info_href;

my $tmpl = {
active_parameter_href => {
default => {},
defined => 1,
required => 1,
store => \$active_parameter_href,
strict_type => 1,
},
sample_info_href => {
default => {},
defined => 1,
required => 1,
store => \$sample_info_href,
strict_type => 1,
},
};

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

use MIP::Sample_info qw{ get_pedigree_sample_id_attributes };

## Has two samples
return 0
if ( scalar @{ $active_parameter_href->{sample_ids} } != $DUO_MEMBERS_COUNT );

SAMPLE_ID:
foreach my $sample_id ( @{ $active_parameter_href->{sample_ids} } ) {

my %sample_attributes = get_pedigree_sample_id_attributes(
{
sample_id => $sample_id,
sample_info_href => $sample_info_href,
}
);

## Find a child
next SAMPLE_ID if ( not( $sample_attributes{father} or $sample_attributes{mother} ) );

return 1 if ( $sample_attributes{phenotype} eq q{affected} );
}
return 0;
}

sub has_trio {

## Function : Check if case has trio
Expand Down

0 comments on commit e4022ea

Please sign in to comment.