Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vabreu
    Junior Member
    • Mar 2012
    • 1

    #1

    Extracting intergenic region

    Hi guys;

    I am with a problem with my parse. Well I'll try to explain the code before posting it:

    I have a table with information on areas where I need to find intergenic regions, ie, I can not use ID or locus_tag to search these regions. So I picked up at the table and startCoord stopCoord of each target region I'm going to put in array for later use as a search key.

    PS: The db isn't gbrowser.

    The output is multiFasta my $ out = Bio :: SeqIO-> new (-file => "> outputfilename", '-format' => 'Fasta'); #unfinished.


    #!/usr/bin/perl -w
    use strict;
    use Bio::Perl;
    use Bio::Seq;
    use Bio::SeqIO;
    use IO::String;
    use Bio::SearchIO;
    use DBI;
    use CGI;
    use Bio::PrimarySeq;

    my ($fastaFile)=@ARGV;

    #Get fasta file
    my $in = Bio::SeqIO->new(-file => $fastaFile, -format => 'Fasta');

    #write fasta file
    my $out = Bio::SeqIO->new(-file => '>multFasta.fa', -format => "Fasta", -flush => 0);

    my $subseq;

    #DB Parte, take informations, Regulator, Target, starCoord, stopCoord.

    my $dbh = DBI->connect('dbi:mysql:db_name','user','password') or die "Connection Error: $DBI::errstr\n";

    # select multiple fields with multiple rows:

    my $sql = qq`SELECT Regulator , Target , startCoord , stopCoord FROM table WHERE 1`;
    my $sth = $dbh->prepare($sql) or die "Cannot prepare: " . $dbh->errstr();
    $sth->execute() or die "Cannot execute: " . $sth->errstr();
    my @row;
    my @fields;
    while(@row = $sth->fetchrow_array()) {
    my @record = @row;
    push(@fields, \@record);
    }
    $sth->finish();


    # now process the fields

    if (@fields != 0) {
    my $i=0;
    foreach my $line (@fields) {
    my $seq = $in->next_seq();
    $subseq = $seq->subseq(@$line[2],@$line[3]); #Here is the problem
    print "$subseq";
    #print "@$line[2], @$line[3]"."\n";
    #$out ->write_seq($subseq);
    }
    $i++;
    }
    }


    $sth -> finish;
    $dbh -> disconnect;
    ### End of DB Part ###
    exit;
    When I run, bioperl told me:
    ------------- EXCEPTION: Bio::Root::Exception -------------
    MSG: Bad end parameter (2692830). End must be less than the total length of sequence (total=1524)
    STACK: Error::throw
    STACK: Bio::Root::Root::throw /usr/local/share/perl/5.10.1/Bio/Root/Root.pm:368
    STACK: Bio::PrimarySeq::subseq /usr/local/share/perl/5.10.1/Bio/PrimarySeq.pm:401
    STACK: Bio::Seq::subseq /usr/local/share/perl/5.10.1/Bio/Seq.pm:635
    STACK: parse_starr_and_stop.perl:48

    I've been a weak with this problem, and I can't resolve.

    I thank you in advance.

Latest Articles

Collapse

  • SEQadmin2
    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
    by SEQadmin2



    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
    ...
    10-14-2026, 09:55 AM
  • SEQadmin2
    New Genomics Technologies Take Aim at Long-Standing Limits
    by SEQadmin2


    Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

    We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
    ...
    09-28-2026, 10:25 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by SEQadmin2, 10-22-2026, 11:13 AM
0 responses
25 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-22-2026, 10:48 AM
0 responses
20 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-15-2026, 10:52 AM
0 responses
36 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 10-14-2026, 05:39 AM
0 responses
42 views
0 reactions
Last Post SEQadmin2  
Working...