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
    How Immunogenomics Decodes Immunity’s Genetic Blueprint
    by SEQadmin2




    The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

    This convergence of genetics, immunology, and computation...
    Today, 05:41 AM
  • SEQadmin2
    Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
    by SEQadmin2



    CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

    Despite this, “CRISPR helped turn genome editing from a specialized technique into
    ...
    07-31-2026, 11:01 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by SEQadmin2, 08-24-2026, 10:32 AM
0 responses
39 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 08-20-2026, 11:17 AM
0 responses
45 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 08-18-2026, 10:05 AM
0 responses
51 views
0 reactions
Last Post SEQadmin2  
Started by SEQadmin2, 08-13-2026, 12:22 PM
0 responses
49 views
0 reactions
Last Post SEQadmin2  
Working...