my ( $fh, $entry, @list );
- $fh = Maasha::Common::read_open( $path );
+ $fh = Maasha::Filesys::file_read_open( $path );
while ( $entry = bed_get_entry( $fh ) ) {
push @list, $entry;
$cols, # Number of columns in BED file
) = @_;
- &Maasha::Common::run( "bed_sort", "--sort $sort_mode --cols $cols $bed_file" );
+ Maasha::Common::run( "bed_sort", "--sort $sort_mode --cols $cols $bed_file" );
}
foreach $bed_file ( @{ $bed_files } )
{
- $fh_in = Maasha::Common::read_open( $bed_file );
+ $fh_in = Maasha::Filesys::file_read_open( $bed_file );
while ( $entry = bed_entry_get_array( $fh_in, $cols ) )
{
$key = $entry->[ CHR ];
- $fh_hash{ $key } = Maasha::Common::write_open( "$tmp_dir/$key.temp" ) if not exists $fh_hash{ $key };
+ $fh_hash{ $key } = Maasha::Filesys::file_write_open( "$tmp_dir/$key.temp" ) if not exists $fh_hash{ $key };
bed_entry_put_array( $entry, $fh_hash{ $key } );
}
$sql_file = "$tmp_dir/upload_RNA_SS.sql";
- $fh_out = Maasha::Common::write_open( $sql_file );
+ $fh_out = Maasha::Filesys::file_write_open( $sql_file );
print $fh_out qq(
CREATE TABLE $table (
my ( $fh, $pos, $index_beg, $index_len, $entry, $locator, $chr, $step, $beg, $end, $len, %index, $i );
- $fh = Maasha::Common::read_open( $path );
+ $fh = Maasha::Filesys::file_read_open( $path );
$pos = 0;
# returns nothing
- Maasha::Common::file_store( $path, $index );
+ Maasha::Filesys::file_store( $path, $index );
}
my $index;
- $index = Maasha::Common::file_retrieve( $path );
+ $index = Maasha::Filesys::file_retrieve( $path );
return wantarray ? %{ $index } : $index;
}
if ( $beg <= $index->{ $chr }->[ $index_beg ]->[ FS_CHR_END ] and $end >= $index->{ $chr }->[ $index_beg ]->[ FS_CHR_BEG ] )
{
- @vals = split "\n", Maasha::Common::file_read(
+ @vals = split "\n", Maasha::Filesys::file_read(
$fh,
$index->{ $chr }->[ $index_beg ]->[ FS_INDEX_BEG ] + 6 * ( $beg - $index->{ $chr }->[ $index_beg ]->[ FS_CHR_BEG ] ),
6 * ( $end - $beg + 1 ),
if ( $beg <= $index->{ $chr }->[ $index_beg ]->[ FS_CHR_END ] )
{
- @vals = split "\n", Maasha::Common::file_read(
+ @vals = split "\n", Maasha::Filesys::file_read(
$fh,
$index->{ $chr }->[ $index_beg ]->[ FS_INDEX_BEG ] + 6 * ( $beg - $index->{ $chr }->[ $index_beg ]->[ FS_CHR_BEG ] ),
6 * ( $index->{ $chr }->[ $index_beg ]->[ FS_CHR_END ] - $beg + 1 ),
if ( $end <= $index->{ $chr }->[ $index_end ]->[ FS_CHR_END ] )
{
- @vals = split "\n", Maasha::Common::file_read(
+ @vals = split "\n", Maasha::Filesys::file_read(
$fh,
$index->{ $chr }->[ $index_end ]->[ FS_INDEX_BEG ],
6 * ( $end - $index->{ $chr }->[ $index_end ]->[ FS_CHR_BEG ] + 1 ),
for ( $i = $index_beg + 1; $i <= $index_end - 1; $i++ )
{
- @vals = split "\n", Maasha::Common::file_read(
+ @vals = split "\n", Maasha::Filesys::file_read(
$fh,
$index->{ $chr }->[ $i ]->[ FS_INDEX_BEG ],
6 * ( $index->{ $chr }->[ $i ]->[ FS_CHR_END ] - $index->{ $chr }->[ $i ]->[ FS_CHR_BEG ] + 1 ),
my ( $fh, $line, @fields, @align );
- $fh = Maasha::Common::read_open( $path );
+ $fh = Maasha::Filesys::file_read_open( $path );
while ( $line = <$fh> )
{
return if not -f $file;
- $fh = Maasha::Common::read_open( $file );
+ $fh = Maasha::Filesys::file_read_open( $file );
while ( $line = <$fh> )
{
return if not -f $file;
- $fh = Maasha::Common::read_open( $file );
+ $fh = Maasha::Filesys::file_read_open( $file );
while ( $line = <$fh> )
{