Maasha::UCSC::bed_put_entry( $new_record, $fh, $cols );
}
+ elsif ( $record->{ 'tBaseInsert' } ) # ---- Dirty addition to allow Affy data from MySQL to be dumped ----
+ {
+ $record = Maasha::UCSC::psl2record( $record );
+
+ $new_record = $record;
+ $new_record->{ "CHR" } = $record->{ "S_ID" };
+ $new_record->{ "CHR_BEG" } = $record->{ "S_BEG" };
+ $new_record->{ "CHR_END" } = $record->{ "S_END" };
+ $new_record->{ "Q_ID" } = $record->{ "Q_ID" };
+ $new_record->{ "SCORE" } = $record->{ "SCORE" } || 999;
+ $new_record->{ "STRAND" } = $record->{ "STRAND" };
+
+ Maasha::UCSC::bed_put_entry( $new_record, $fh, $cols );
+ }
elsif ( $record->{ "CHR" } and defined $record->{ "CHR_BEG" } and $record->{ "CHR_END" } ) # ---- Generic data from tables ----
{
Maasha::UCSC::bed_put_entry( $record, $fh, $cols );
$args = join " ", $options->{ "database" }, $options->{ "table" }, "-tmpDir=$tmp_dir", $file;
}
- if ( $options->{ "sec_struct" } )
+ if ( $options->{ "table" } =~ /rnaSecStr/ )
{
$table = $options->{ "table" };
- Maasha::Common::error( "Attempt to load secondary structure track without 'rnaSecStr' in table name" ) if not $table =~ /rnaSecStr/;
+ print qq(uploading secondary structure table:"$table"\n) if $options->{ "verbose" };
$sql_file = "$tmp_dir/upload_RNA_SS.sql";
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PSL format <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+sub psl2record
+{
+ # Martin A. Hansen, November 2008
+
+ # Converts PSL record keys to Biopiece record keys.
+
+ my ( $psl, # hashref
+ ) = @_;
+
+ # returns hashref
+
+ my %record;
+
+ %record = (
+ REC_TYPE => "PSL",
+ BLOCKSIZES => $psl->{ 'blockSize' },
+ SNUMINSERT => $psl->{ 'tNumInsert' },
+ Q_END => $psl->{ 'qEnd' },
+ SBASEINSERT => $psl->{ 'tBaseInsert' },
+ S_END => $psl->{ 'tEnd' },
+ QBASEINSERT => $psl->{ 'qBaseInsert' },
+ REPMATCHES => $psl->{ 'repMatches' },
+ QNUMINSERT => $psl->{ 'qNumInsert' },
+ MISMATCHES => $psl->{ 'misMatches' },
+ BLOCKCOUNT => $psl->{ 'blockCount' },
+ Q_LEN => $psl->{ 'qSize' },
+ S_ID => $psl->{ 'tName' },
+ STRAND => $psl->{ 'strand' },
+ Q_ID => $psl->{ 'qName' },
+ MATCHES => $psl->{ 'matches' },
+ S_LEN => $psl->{ 'tSize' },
+ NCOUNT => $psl->{ 'nCount' },
+ Q_BEGS => $psl->{ 'qStarts' },
+ S_BEGS => $psl->{ 'tStarts' },
+ S_BEG => $psl->{ 'tStart' },
+ Q_BEG => $psl->{ 'qStart ' },
+ );
+
+ $record{ "SCORE" } = $record{ "MATCHES" } + int( $record{ "REPMATCHES" } / 2 ) - $record{ "MISMATCHES" } - $record{ "QNUMINSERT" } - $record{ "SNUMINSERT" };
+ $record{ "SPAN" } = $record{ "Q_END" } - $record{ "Q_BEG" };
+
+ return wantarray ? %record : \%record;
+}
+
sub psl_get_entry
{
priority
useScore
visibility
+ maxHeightPixels
color
type );
}