Bio::EnsEMBL::Funcgen::Parsers
Nimblegen
Toolbar
Summary
Bio::EnsEMBL::Funcgen::Parsers::Nimblegen
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
my $parser_type = "Bio::EnsEMBL::Funcgen::Parsers::Nimblegen";
push @INC, $parser_type;
my $imp = $class->SUPER::new(@_);
Description
This is a parser class which should not be instatiated directly, it
normally set by the Importer as the parent class. Nimblegen contains meta
data and methods specific to NimbleGen arrays to aid parsing and importing of
experimental data.
Methods
Methods description
Example : my $self = $class->SUPER::new(@_); Description: Constructor method for Nimblegen class Returntype : Bio::EnsEMBL::Funcgen::Parser::Nimblegen Exceptions : throws if Experiment name not defined or if caller is not Importer Caller : Bio::EnsEMBL::Funcgen::Importer Status : at risk |
Example : $imp->read_results_data(); Description: Parses and dumps raw results to file Returntype : none Exceptions : none Caller : Importer Status : at risk |
Example : $imp->read_array_data(); Description: Parses NimbleGen DesignNotes.txt files to create and store new Arrays Returntype : none Exceptions : None Caller : general Status : At risk - Can this be generic? Can we force the creation of a DesignNotes file on other formats? |
Example : $imp->read_array_chip_data(); Description: Parses and imports array & experimental chip meta data/objects Returntype : none Exceptions : throws if more than one array/design found and not an "array set" Caller : Importer Status : At risk |
Example : $imp->read_probe_data(); Description: Parses and imports probes, probe sets and features of a given array No duplicate handling or probe caching is performed due to memory issues, this is done in resolve_probe_data. Returntype : none Exceptions : none Caller : Importer Status : Medium |
Example : my $self->set_config; Description: Sets attribute dependent config Returntype : None Exceptions : None Caller : Bio::EnsEMBL::Funcgen::Importer Status : at risk |
Methods code
sub new
{ my $caller = shift;
my $class = ref($caller) || $caller;
my $self = $class->SUPER::new();
throw("This is a skeleton class for Bio::EnsEMBL::Importer, should not be used directly") if(! $self->isa("Bio::EnsEMBL::Funcgen::Importer"));
$self->{'config'} =
{(
array_data => ['experiment'], probe_data => ["probe"],
results_data => ["and_import_results"],
sample_key_fields => ['DESIGN_ID', 'CHIP_ID', 'DYE', 'PROMOT_SAMPLE_TYPE'], ndf_fields => ['CONTAINER', 'PROBE_SEQUENCE', 'MISMATCH','FEATURE_ID', 'PROBE_ID'], pos_fields => ['CHROMOSOME', 'PROBE_ID', 'POSITION', 'COUNT'],
result_fields => ['PROBE_ID', 'PM', 'X', 'Y'],
notes_fields => ['DESIGN_ID', 'DESIGN_NAME', 'DESCRIPTION'],
norm_method => 'VSN_GLOG',
dye_freqs => {(
Cy5 => 635,
Cy3 => 532,
)},
protocols => {(
grow => {(
accession => 'GROW_NIMB',
name => 'GROW NIMBLEGEN CULTURE CONDITIONS',
text => 'Nimblegen culture conditions description here. Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.',
paramters => undef,
)},
treatment => {(
accession => 'CROSSLINK_NIMB',
name => 'NIMBLEGEN CHROMATIN PREPARATION',
text => 'Nimblegen X-linking and DNA extraction protocol.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.',
paramters => undef,
)},
extraction => {(
accession => 'CHROMATIN_IP_NIMB',
name => 'NIMBLEGEN CHROMATIN IMMUNOPRECIPITATION and DNA RECOVERY',
text => 'Nimblegen chromatin immunoprecipitation and DNA extraction protocol here.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.',
paramters => undef,
)},
labeling => {(
accession => 'LABELLING_NIMB',
name => 'NIMBLEGEN LABELLING',
text => 'Nimblegen labelling protocol here.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.',
paramteres => undef,
)},
hybridization => {(
accession => 'HYBRIDISATION_NIMB',
name => 'NIMBLEGEN HYBRIDISATION',
text => 'Nimblegen chip hybridisation protocol here.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.',
parameters => undef,
)},
scanning => {(
accession => 'SCANNING_NIMB',
name => 'NIMBLESCAN',
text => 'Nimblegen Nimblescan protocol here.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.Padding text here to avoid description too short warnings.',
paramters => undef,
)},
)},
)};
return $self; } |
sub read_and_import_results_data
{ my $self = shift;
$self->log("Parsing ".$self->vendor()." results");
my (@header, @data, @design_ids, @lines);
my ($fh, $pid, $line, $file);
my $anal = $self->db->get_AnalysisAdaptor->fetch_by_logic_name("RawValue");
my $result_set = $self->get_import_ResultSet($anal, 'channel');
if ($result_set) {
foreach my $echip (@{$self->experiment->get_ExperimentalChips()}) {
foreach my $chan (@{$echip->get_Channels()}) {
if ( ! $chan->has_status('IMPORTED')) {
my $array = $echip->get_ArrayChip->get_Array();
$self->get_probe_cache_by_Array($array) || throw('Failed to get the probe cache handle for results import, resolve cache here?');
my ($probe_elem, $score_elem, %hpos);
my $cnt = 0;
my $r_string = "";
my $chan_name = $echip->unique_id()."_".$self->get_config('dye_freqs')->{$chan->dye()};
my $cc_id = $result_set->get_chip_channel_id($chan->dbID());
my $out_file = $self->get_dir("raw")."/result.".$chan_name.".txt";
$self->backup_file($out_file);
my $r_out = open_file($out_file, '>');
(my $alt_chan_name = $chan_name) =~ s/\_/\_1h\_/;
my $found = 0;
FILE: foreach my $name($chan_name, $alt_chan_name){
foreach my $suffix ("_pair.txt", ".pair", ".txt") {
$file = $self->get_dir("results")."/".$name.$suffix;
if (-f $file) {
$found = 1;
last FILE;
}
}
}
throw("Could not find result file for Channel(${chan_name}) in ".$self->get_dir('results')) if ! $found;
$self->log("Reading result for channel $chan_name:\t$file", 1);
$fh = open_file($file);
@lines = <$fh>;
close($fh);
foreach my $i (0..$#lines) {
if ($lines[$i] =~ /PROBE_ID/o) {
$lines[$i] =~ s/\r*\n//o;
@data = split/\t/o, $lines[$i];
%hpos = %{$self->set_header_hash(\@data, $self->get_config('result_fields'))};
splice @lines, $i, 1;
last; }
}
@lines = sort {(split/\t/o, $a)[$hpos{'PROBE_ID'}] cmp (split/\t/o, $b)[$hpos{'PROBE_ID'}]} @lines;
$self->log('Parsing results', 1);
foreach $line(@lines) {
next if $line =~ /^#/;
next if $line =~ /NGS_CONTROLS/;
next if $line =~ /V_CODE/;
next if $line =~ /H_CODE/;
next if $line =~ /RANDOM/;
$line =~ s/\r*\n//o;
@data = split/\t/o, $line;
if ($pid = $self->get_probe_id_by_name_Array($data[$hpos{'PROBE_ID'}], $array)) {
$cnt ++;
$r_string .= '\N'."\t${pid}\t".$data[$hpos{'PM'}]."\t${cc_id}\t".$data[$hpos{'X'}]."\t".$data[$hpos{'Y'}]."\n";
} else {
warn "Found unfiltered non-experimental probe in input $data[$hpos{'PROBE_ID'}]";
}
if ($cnt > 10000) {
$cnt = 0;
print $r_out $r_string;
$r_string ="";
}
}
print $r_out $r_string;
close($r_out);
$self->log("Finished parsing $chan_name result", 1);
$self->log("Importing:\t$out_file");
$self->db->load_table_data("result", $out_file);
$self->log("Finished importing:\t$out_file", 1);
$chan->adaptor->store_status('IMPORTED', $chan);
}
}
}
}
else {
$self->log("Skipping results parse and import");
}
$self->log("Finished parsing and importing results");
return;
}
1; } |
sub read_array_data
{ my ($self, $notes_file) = @_;
$notes_file ||= $self->get_config('notes_file');
my ($line, $array, $array_chip, @data, %hpos);
my $oa_adaptor = $self->db->get_ArrayAdaptor();
my $ac_adaptor = $self->db->get_ArrayChipAdaptor();
my $fh = open_file($notes_file);
while ($line = <$fh>){
$line =~ s/\r*\n//; @data = split/\t/o, $line;
if($. == 1){
%hpos = %{$self->set_header_hash(\@data, $self->get_config('notes_fields'))};
next;
}
if(! defined $array ){
$array = Bio::EnsEMBL::Funcgen::Array->new
(
-NAME => $self->array_name() || $data[$hpos{'DESIGN_NAME'}],
-FORMAT => uc($self->format()),
-VENDOR => uc($self->vendor()),
-TYPE => 'OLIGO',
-DESCRIPTION => $data[$hpos{'DESCRIPTION'}], );
($array) = @{$oa_adaptor->store($array)};
$array_chip = Bio::EnsEMBL::Funcgen::ArrayChip->new(
-ARRAY_ID => $array->dbID(),
-NAME => $data[$hpos{'DESIGN_NAME'}],
-DESIGN_ID => $data[$hpos{'DESIGN_ID'}],
);
($array_chip) = @{$ac_adaptor->store($array_chip)};
$array->add_ArrayChip($array_chip);
}
elsif((! $array->get_ArrayChip_by_design_id($data[$hpos{'DESIGN_ID'}])) && ($self->array_set())){
$self->log("Generating new ArrayChip(".$data[$hpos{'DESIGN_NAME'}].") for same Array:\t".$array->name()."\n");
$array_chip = Bio::EnsEMBL::Funcgen::ArrayChip->new(
-ARRAY_ID => $array->dbID(),
-NAME => $data[$hpos{'DESIGN_NAME'}],
-DESIGN_ID => $data[$hpos{'DESIGN_ID'}],
);
($array_chip) = @{$ac_adaptor->store($array_chip)};
$array->add_ArrayChip($array_chip);
}
elsif(! $array->get_ArrayChip_by_design_id($data[$hpos{'DESIGN_ID'}])){
throw("Found experiment with more than one design without -array_set");
}
}
$self->add_Array($array);
close($fh);
return; } |
sub read_experiment_data
{ my $self = shift;
$self->read_array_data();
my $t2m_file = $self->init_tab2mage_export() if $self->{'write_mage'};
my ($design_desc, $line, $tmp_uid, $channel, $echip, $sample_label);
my ($sample_desc, %hpos, @data, %uid_reps, %did_reps, %sample_reps);
my $ec_adaptor = $self->db->get_ExperimentalChipAdaptor();
my $chan_adaptor = $self->db->get_ChannelAdaptor();
my $br_cnt = 1;
my $tr_cnt = 1;
warn("Harcoded for one array(can have multiple chips from the same array) per experiment\n");
my $fh = open_file($self->get_config("chip_file"));
$self->log("Reading chip data");
warn "Do we need to validate each line here against the header array?";
while ($line = <$fh>){
next if $line =~ /^\s+\r*\n/;
$line =~ s/\r*\n//; @data = split/\t/o, $line;
if ($. == 1){
%hpos = %{$self->set_header_hash(\@data, $self->get_config('sample_key_fields'))};
@data = grep(/SAMPLE_DESCRIPTION/, keys %hpos);
$sample_desc = $data[0];
throw("More than one sample description(@data) in ".$self->get_config("chip_file")."\n") if(scalar @data >1);
next;
}
if ((! $tmp_uid) || ($data[$hpos{'CHIP_ID'}] ne $tmp_uid)){
if($echip){
for my $type('TOTAL', 'EXPERIMENTAL'){
my $test_chan = $chan_adaptor->fetch_by_type_experimental_chip_id($type, $echip->dbID());
throw("ExperimentalChip(".$echip->unique_id().
") does not have a $type channel, please check the SampleKey.txt file") if ! $test_chan;
}
}
$tmp_uid = $data[$hpos{'CHIP_ID'}];
$echip = $ec_adaptor->fetch_by_unique_id_vendor($data[$hpos{'CHIP_ID'}], 'NIMBLEGEN');
if($echip){
if(! $self->recovery()){
throw("ExperimentalChip(".$echip->unqiue_id().
" already exists in the database\nMaybe you want to recover?");
}
}else{
$echip = Bio::EnsEMBL::Funcgen::ExperimentalChip->new
(
-EXPERIMENT_ID => $self->experiment->dbID(),
-DESCRIPTION => $data[$hpos{$sample_desc}],
-FEATURE_TYPE => $self->feature_type,
-CELL_TYPE => $self->cell_type,
-ARRAY_CHIP_ID => $self->arrays->[0]->get_ArrayChip_by_design_id($data[$hpos{'DESIGN_ID'}])->dbID(),
-UNIQUE_ID => $data[$hpos{'CHIP_ID'}],
);
($echip) = @{$ec_adaptor->store($echip)};
$self->experiment->add_ExperimentalChip($echip);
}
}
my $type = uc($data[$hpos{'PROMOT_SAMPLE_TYPE'}]);
my $sample_label = (! exists $hpos{'SAMPLE_LABEL'}) ? '' : $data[$hpos{'SAMPLE_LABEL'}];
$type = 'TOTAL' if ($type ne 'EXPERIMENTAL');
$channel = $chan_adaptor->fetch_by_type_experimental_chip_id($type, $echip->dbID());
if($channel){
if(! $self->recovery()){
throw("Channel(".$echip->unqiue_id().":".uc($data[$hpos{'PROMOT_SAMPLE_TYPE'}]).
" already exists in the database\nMaybe you want to recover?");
}else{
}
}else{
$channel = Bio::EnsEMBL::Funcgen::Channel->new
(
-EXPERIMENTAL_CHIP_ID => $echip->dbID(),
-DYE => $data[$hpos{'DYE'}],
-SAMPLE_ID => $sample_label,
-TYPE => $type,
);
($channel) = @{$chan_adaptor->store($channel)};
}
if($self->{'write_mage'}){
my $ctype_name = (defined $self->cell_type()) ? $self->cell_type->name() : '???';
my $ftype_name = (defined $self->feature_type()) ? $self->feature_type->name() : '???';
my $ctype_desc = (defined $self->cell_type()) ? $self->cell_type->description() : '???';
if(exists $sample_reps{$sample_label}){ $uid_reps{$data[$hpos{'CHIP_ID'}]}{'br'} = $sample_reps{$sample_label};
}
elsif(exists $uid_reps{$data[$hpos{'CHIP_ID'}]}){ $sample_reps{$sample_label} = $uid_reps{$data[$hpos{'CHIP_ID'}]}{'br'};
}
else{ $sample_reps{$sample_label} = $br_cnt; $uid_reps{$data[$hpos{'CHIP_ID'}]}{'br'} = $br_cnt; $br_cnt++;
}
if(! exists $uid_reps{$data[$hpos{'CHIP_ID'}]}{'tr'}){
my $create_rep = 1;
my $tr;
my @chip_ids;
my $br = $uid_reps{$data[$hpos{'CHIP_ID'}]}{'br'};
foreach my $chip_id(keys %uid_reps){
push @chip_ids, $chip_id if($uid_reps{$chip_id}{'br'} == $br);
}
foreach my $rep(sort keys %did_reps){
if(! exists $did_reps{$rep}{$data[$hpos{'DESIGN_ID'}]}){
$create_rep = 0;
}elsif(! grep(/$did_reps{$rep}{$data[$hpos{'DESIGN_ID'}]}/, @chip_ids)){
$create_rep = 0;
}
if(! $create_rep){
$did_reps{$rep}{$data[$hpos{'DESIGN_ID'}]} = $data[$hpos{'CHIP_ID'}]; $tr = $rep;
last; }
}
if($create_rep){
my @trs;
foreach my $rep(keys %did_reps){
foreach my $chip_id(values %{$did_reps{$rep}}){
push @trs, $rep if(grep(/$chip_id/, @chip_ids));
}
}
($tr) = sort {$b<=>$a} @trs;
$tr ||=0;
$tr++;
$did_reps{$tr}{$data[$hpos{'DESIGN_ID'}]} = $data[$hpos{'CHIP_ID'}];
}
$uid_reps{$data[$hpos{'CHIP_ID'}]}{'tr'} = $tr;
}
my $br = $self->experiment->name().'_BR'. $uid_reps{$data[$hpos{'CHIP_ID'}]}{'br'};
my $tr = $br.'_TR'.$uid_reps{$data[$hpos{'CHIP_ID'}]}{'tr'};
my $tsm_line = $echip->unique_id().'_'.$self->get_config('dye_freqs')->{$data[$hpos{'DYE'}]}.'_pair.txt';
$tsm_line .= "\t".$data[$hpos{'DESIGN_ID'}];
$tsm_line .= "\t".$echip->unique_id();
foreach my $protocol(sort (keys %{$self->get_config('protocols')})){
$tsm_line .= "\t".$self->get_config('protocols')->{$protocol}->{'accession'};
}
$tsm_line .= "\t$ctype_name";
$tsm_line .= "\t$br";
$tsm_line .= "\t$tr";
if($type eq 'EXPERIMENTAL'){
$tsm_line .= "\t$sample_label - IP of $tr with anti $ftype_name (Ab vendor, Ab ID)";
$tsm_line .= "\t$tr IP";
}else{
$tsm_line .= "\t$sample_label - Input control DNA of $tr\t";
}
$tsm_line .= "\t$ctype_name $tr ChIP $ftype_name ".$echip->unique_id().' hyb';
$tsm_line .= "\tcell\tgenomic_DNA\tgenomic_DNA\tsynthetic_DNA";
$tsm_line .= "\t".$data[$hpos{'DYE'}];
$tsm_line .= "\t".$self->species();
$tsm_line .= "\tfrozen_sample";
$tsm_line .= "\t$ctype_name";
$tsm_line .= "\t$ctype_name";
$tsm_line .= "\t???";
$tsm_line .= "\t$ctype_name";
$tsm_line .= ($type eq 'EXPERIMENTAL') ? "\tanti-${ftype_name} antibody\n" : "\t\n";
print $t2m_file $tsm_line;
}
}
close($t2m_file) if $self->{'write_mage'};
close($fh);
return; } |
sub read_probe_data
{ my ($self) = shift;
my ($fh, $line, @data, %hpos, %probe_pos); $self->log("Parsing and importing ".$self->vendor()." probe data (".localtime().")", 1);
my $slice_a = $self->db->get_SliceAdaptor();
my $cs = $self->db->get_FGCoordSystemAdaptor()->fetch_by_name('chromosome');
warn "Read probe data should only read in the array chips which are specified by the ExperimentalChip? Not just what is present in the DesignNotes file?";
foreach my $array(@{$self->arrays()}){
foreach my $achip(@{$array->get_ArrayChips()}){
my (@log, %probe_pos, $fasta_file, $f_out);
if($achip->has_status('IMPORTED')){
$self->log("Skipping fully imported ArrayChip:\t".$achip->design_id());
next;
}elsif($self->recovery()){
$self->log("Rolling back ArrayChip:\t".$achip->design_id());
$self->rollback_ArrayChip($achip);
}
$self->log("Importing ArrayChip:".$achip->design_id());
$fh = open_file($self->get_dir("design")."/".$achip->name().".pos");
while($line = <$fh>){
$line =~ s/\r*\n//o; @data = split/\t/o, $line;
if ($. == 1){
%hpos = %{$self->set_header_hash(\@data, $self->get_config('pos_fields'))};
next;
}
if(exists $probe_pos{$data[$hpos{'PROBE_ID'}]}){
if($data[$hpos{'CHROMOSOME'}] eq $probe_pos{$data[$hpos{'PROBE_ID'}]}->{chr} &&
($data[$hpos{'POSITION'}]+1) eq $probe_pos{$data[$hpos{'PROBE_ID'}]}->{start}){
next;
}
else{
throw("Found duplicate mapping for ".$data[$hpos{'PROBE_ID'}].
" need implement duplicate logging/cleaning");
}
}
my $random = 0;
if(! $self->cache_slice($data[$hpos{'CHROMOSOME'}])){
push @log, "Skipping feature import for probe ".$data[$hpos{'PROBE_ID'}]." with non-standard region ".$data[$hpos{'CHROMOSOME'}];
}
$probe_pos{$data[$hpos{'PROBE_ID'}]} = {(
chr => $data[$hpos{'CHROMOSOME'}],
start => ($data[$hpos{'POSITION'}] +1), )};
}
$self->log("Built position cache from : ".$achip->name().".pos", 1);
close($fh);
$self->log("Importing design probes from : ".$achip->name().".ndf");
$fh = open_file($self->get_dir("design")."/".$achip->name().".ndf");
if($self->dump_fasta()){
$fasta_file = $self->get_dir('fastas').'/'.$achip->name().".fasta";
$self->backup_file($fasta_file);
$f_out = open_file($fasta_file, '>');
}
my ($length, $ops, $op, $of, %pfs);
my $anal = $self->db->get_AnalysisAdaptor()->fetch_by_logic_name("VendorMap");
my $strand = 0;
my $fasta = "";
while($line = <$fh>){
$line =~ s/\r*\n//;
@data = split/\t/o, $line;
my $loc = "";
my $class = "EXPERIMENTAL";
if ($. == 1){
%hpos = %{$self->set_header_hash(\@data, $self->get_config('ndf_fields'))};
next;
}
if (! exists $probe_pos{$data[$hpos{'PROBE_ID'}]}){
push @log, "Skipping non-experimental probe:\t".$data[$hpos{'PROBE_ID'}];
next;
}
if($data[$hpos{'FEATURE_ID'}] != $data[$hpos{'MATCH_INDEX'}]){
if($ops && ($data[$hpos{'FEATURE_ID'}] ne $ops->name())){
$self->store_set_probes_features($achip->dbID(),\% pfs, $ops);
throw("ops still defined in caller") if defined $ops;
}
$ops = Bio::EnsEMBL::Funcgen::ProbeSet->new(
-NAME => $data[$hpos{'FEATURE_ID'}],
-SIZE => undef,
-FAMILY => $data[$hpos{'CONTAINER'}],
);
undef %pfs
}
elsif($. > 2){ $self->store_set_probes_features($achip->dbID(),\% pfs, $ops);
throw("ops still defined in caller") if defined $ops;
}
$length = length($data[$hpos{'PROBE_SEQUENCE'}]);
$op = Bio::EnsEMBL::Funcgen::Probe->new(
-NAME => $data[$hpos{'PROBE_ID'}],
-LENGTH => $length,
-ARRAY => $array,
-ARRAY_CHIP_ID => $achip->dbID(),
-CLASS => $class,
);
%{$pfs{$data[$hpos{'PROBE_ID'}]}} = (
probe => $op,
features => [],
);
if ($self->dump_fasta()){
$fasta .= ">".$data[$hpos{'PROBE_ID'}]."\t".$achip->design_id."\n".$data[$hpos{'PROBE_SEQUENCE'}]."\n";
if(! ($. % 10000)){
print $f_out $fasta;
$fasta = '';
}
}
next if(! $self->cache_slice($probe_pos{$data[$hpos{'PROBE_ID'}]}->{'chr'}));
$of = Bio::EnsEMBL::Funcgen::ProbeFeature->new
(
-START => $probe_pos{$data[$hpos{'PROBE_ID'}]}->{'start'},
-END =>($probe_pos{$data[$hpos{'PROBE_ID'}]}->{'start'} + $length),
-STRAND => $strand,
-SLICE => $self->cache_slice($probe_pos{$data[$hpos{'PROBE_ID'}]}->{'chr'}),
-ANALYSIS => $anal,
-MISMATCHCOUNT => $data[$hpos{'MISMATCH'}], -PROBE => undef, );
push @{$pfs{$data[$hpos{'PROBE_ID'}]}{'features'}}, $of;
}
$self->store_set_probes_features($achip->dbID(),\% pfs, $ops);
$self->log(join("\n", @log));
$achip->adaptor->store_status("IMPORTED", $achip);
$self->log("ArrayChip:\t".$achip->design_id()." has been IMPORTED");
if ($self->dump_fasta()){
print $f_out $fasta;
close($f_out);
}
$self->log("Imported design from:\t".$achip->name().".ndf", 1);
}
}
$self->log("Finished parsing probe data");
$self->resolve_probe_data();
return; } |
sub set_config
{ my $self = shift;
if($self->{'old_dvd_format'}){
$self->{'design_dir'} = $self->get_dir('input').'/DesignFiles';
}else{
$self->{'design_dir'} = $self->get_dir('input').'/Design_information';
}
if($self->{'old_dvd_format'}){
$self->{'config'}{'notes_file'} = $self->get_dir('input').'/DesignNotes.txt';
}else{
$self->{'config'}{'notes_file'} = $self->get_dir('design').'/DesignNotes.txt';
}
$self->{'config'}{'chip_file'} = $self->get_dir('input').'/SampleKey.txt';
$self->{'output_dir'} ||= $self->get_dir("data").'/output/'.$self->{'param_species'}.'/'.$self->vendor().'/'.$self->name();
$self->{'config'}{'tab2mage_file'} = $self->get_dir('output').'/E-TABM-'.$self->name().'.txt';
$self->{'config'}{'mage_xml_file'} = $self->get_dir('output').'/{UNASSIGNED}.xml';
if($self->{'old_dvd_format'}){
$self->{'results_dir'} = $self->get_dir('input').'/PairData';
}else{
$self->{'results_dir'} = $self->get_dir('input').'/Raw_data_files';
}
return; } |
General documentation
This module was written by Nathan Johnson.