Sample info

Version: 1.0.0

The metadata on the case and samples are recorded in a yaml outfile format with the following data structure and keys:

analysis_date: string
case: string
mip_version: string
  path: string,
},
[VCF_FILE_KEY]: {  #Hash of hashes
  clinical: {  
    path: string,
  },
  research: {  
    path: string,
  },
},
recipe: { #Hash of hashes
    outdirectory: string,
    outfile: string,
    path: string,
    version: string,
    metafile_tag: {  
      directory: string,
      file: string,
      path: string,
      processed_by: string,
      version: string,
    },
  },
},
sample: { #Hash of hashes
    analysis_type: string
    [METAFILE_TAG]: {  
      path: string,
    },
    recipe: {
      [RECIPE_NAME]: {
        outdirectory: string,
        outfile: string,
        path: string,
        version: string,
        metafile_tag: {
          directory: string,
          file: string,
          path: string,
          processed_by: string,
          version: string,
        },
        [INFILE]: {
          outdirectory: string,
          outfile: string,
          path: string,
          version: string,
          metafile_tag: {  
            directory: string,
            file: string,
            path: string,
            processed_by: string,
            version: string,
          },
        },
      },
    },
  },
},

Methods

get_family_member_id: Return hash with family member ids

my %family_member_id = get_family_member_id(
    {
        sample_info_href => $sample_info_href,
    }
);
$family_member_id{children} = [<child1_id>, <child2_id>];
$family_member_id{father} = <father_id>;
$family_member_id{mother} = <mother_id>;

get_pedigree_sample_id_attributes: Return the value of for a supplied sample id with a given attribute (e.g. 'sex')

my $sample_id_sex = get_pedigree_sample_id_attributes({ attribute => q{sex},
                            sample_id => $sample_id,
                            sample_info_href => $sample_info_href,
                              });

get_read_group: Return hash with read group headers.

my %read_group = get_read_group(
            {
                infile_prefix    => $infile_prefix,
                platform         => $active_parameter_href->{platform},
                sample_id        => $sample_id,
                sample_info_href => $sample_info_href,
            }
        );
$rg{id} = <$infile_prefix>;
$rg{pu} = <flowcell>.<lane>.<sample_barcode>;
$rg{sm} = <$sample_id>;
$rg{pl} = <$platform>;
$rg{lb} = <$sample_id>; # Dummy value since the actual LB isn't available in MIP (yet)

get_sample_info_case_recipe_attributes: Return case recipe attribute or attributes hash

# Scalar
my $path = get_sample_info_case_recipe_attributes(
    {
        attribute        => q{path},
        recipe_name      => $recipe_name,
        sample_info_href => \%sample_info,
    }
);
$path = <string>;

# Hash
my %attribute = get_sample_info_case_recipe_attributes(
    {
        recipe_name      => $recipe_name,
        sample_info_href => \%sample_info,
    }
);
$attribute{path} = <string>;

get_sample_info_sample_recipe_attributes: Return sample recipe attribute or attributes hash for infile key

# Scalar
my $path = get_sample_info_sample_recipe_attributes(
    {
        attribute        => q{path},
        infile => $infile,
        recipe_name      => $recipe_name,
        sample_id => $sample_id,
        sample_info_href => \%sample_info,
    }
);
$path = <string>;

# Hash
my %attribute = get_sample_info_sample_recipe_attributes(
    {
        infile => $infile,
        recipe_name      => $recipe_name,
        sample_id => $sample_id,
        sample_info_href => \%sample_info,
    }
);
$attribute{path} = <string>;

set_file_path_to_store: Set file path under store according to file type and file_tag

set_file_path_to_store(
    {
        file_tag         => $file_tag,
        file_type        => $file_type,
        path             => $path,
        sample_info_href => \%sample_info,
    }
);
%sample_info = ( store => { $file_type => { $file_tag => $path, }, } );

Last updated