1 package CXGN
::Genotype
::DownloadFactory
;
5 CXGN::Genotype::DownloadFactory - an object factory to handle downloading genotypes across database. factory delegates between download types e.g. VCF, GenotypeMatrix
9 my $geno = CXGN::Genotype::DownloadFactory->instantiate(
10 'VCF', #can be either 'VCF' or 'DosageMatrix'
13 people_schema=>$people_schema,
14 cache_root_dir=>$cache_root,
15 accession_list=>$accession_list,
16 tissue_sample_list=>$tissue_sample_list,
17 trial_list=>$trial_list,
18 protocol_id_list=>$protocol_id_list,
19 markerprofile_id_list=>$markerprofile_id_list,
20 genotype_data_project_list=>$genotype_data_project_list,
21 chromosome_list=>\@chromosome_numbers,
22 start_position=>$start_position,
23 end_position=>$end_position,
24 marker_name_list=>['S80_265728', 'S80_265723'],
25 genotypeprop_hash_select=>['DS', 'GT', 'DP'], #THESE ARE THE KEYS IN THE GENOTYPEPROP OBJECT
26 protocolprop_top_key_select=>['reference_genome_name', 'header_information_lines', 'marker_names', 'markers'], #THESE ARE THE KEYS AT THE TOP LEVEL OF THE PROTOCOLPROP OBJECT
27 protocolprop_marker_hash_select=>['name', 'chrom', 'pos', 'alt', 'ref'], #THESE ARE THE KEYS IN THE MARKERS OBJECT IN THE PROTOCOLPROP OBJECT
30 compute_from_parents=>0, #If you want to compute the genotype for accessions given from parents in the pedigree. Useful for hybrids where parents are genotyped.
31 forbid_cache=>0, #If you want to get a guaranteed fresh result not from the file cache
32 prevent_transpose=>0, #Prevent transpose of DosageMatrix
33 return_only_first_genotypeprop_for_stock=>1
36 my $status = $geno->download();
43 Nicolas Morales <nm529@cornell.edu>
53 my $location = "CXGN/Genotype/Download/$type.pm";
54 my $obj_class = "CXGN::Genotype::Download::$type";
56 return $obj_class->new(@_);