Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bioperl

    I have try to use the get_SeqFeatures with the following code, however the output looks like there are some errors, not sure how to fix that, any help? Thanks.

    #!/usr/bin/perl

    use Bio::Perl;
    use Bio::SeqIO;
    #use Bio::Graphics;
    use Bio::SeqFeature::Generic;

    my $seqio = Bio::SeqIO->new(-fh => \*STDIN, -format => 'genbank');
    while (my $seq = $seqio->next_seq()) {
    # $seq is-a Bio::FeatureHolderI, hence:
    my @feas = $seq->get_SeqFeatures();
    # each element is-a Bio::SeqFeatureI
    foreach my $fea (@feas) {
    # do something with the feature objects
    print "$fea\n";
    }


    output

    Bio::SeqFeature::Generic=HASH(0x9f1d1c)
    Bio::SeqFeature::Generic=HASH(0x9f03dc)
    Bio::SeqFeature::Generic=HASH(0x9f0460)
    Bio::SeqFeature::Generic=HASH(0x9f25e0)
    Bio::SeqFeature::Generic=HASH(0x9f583c)
    Bio::SeqFeature::Generic=HASH(0x9f2790)
    Bio::SeqFeature::Generic=HASH(0x9f24d8)
    Bio::SeqFeature::Generic=HASH(0x9f6334)
    Bio::SeqFeature::Generic=HASH(0x9f6610)
    Bio::SeqFeature::Generic=HASH(0x9f5cd4)

  • #2
    this is just how perl works and is not a bug nor specific to bioperl

    you are attempting to print an object to the display

    you need to use one of the methods provided by that object to return something that is human-readable (i.e. a string)

    try using the display_name method
    --
    Jeremy Leipzig
    Bioinformatics Programmer
    --
    My blog
    Twitter

    Comment


    • #3
      Thanks. Do any one knows how to pass the objects from get_SeqFeatures, e.g. CDS/EXONS positions to the Bio::Coordinate::GeneMapper function to get different coordinate value? The doc is not very helpful at all. Thanks a lot

      Comment


      • #4
        From the genemapper documentation it looks like you'll need two things:
        # get a Bio::RangeI representing the start, end and strand of the CDS
        # in chromosomal (or entry) coordinates
        my $cds;

        # get a Bio::Location::Split or an array of Bio::LocationI objects
        # holding the start, end and strand of all the exons in chromosomal
        # (or entry) coordinates
        the latter can be gleaned from the SeqFeature using the Location method, though you might have to put them into an array


        There are pretty good BioPerl mailing lists out there but I suggest you learn more basics about using perl objects before posting questions to one of those.
        --
        Jeremy Leipzig
        Bioinformatics Programmer
        --
        My blog
        Twitter

        Comment


        • #5
          I know the functions, however the documentation is not very clear without a good working example. which site is a better bioperl mailing list?

          Comment


          • #6
            how to I get the value out of this objects

            Comment


            • #7
              look at the methods and find one that returns an integer or a string

              have you read through Beginning Perl for Bioinformatics and Mastering Perl for Bioinformatics?

              I understand your frustration but I would not suggest posting to the bp boards. First familiarize yourself well with perl and then read every post you can about coordinates.

              --
              Jeremy Leipzig
              Bioinformatics Programmer
              --
              My blog
              Twitter

              Comment


              • #8
                Thanks, not have much time with it, would like quick help to move on, however thanks anyway.

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Advancing Precision Medicine for Rare Diseases in Children
                  by seqadmin




                  Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                  12-16-2024, 07:57 AM
                • seqadmin
                  Recent Advances in Sequencing Technologies
                  by seqadmin



                  Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                  Long-Read Sequencing
                  Long-read sequencing has seen remarkable advancements,...
                  12-02-2024, 01:49 PM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, 12-17-2024, 10:28 AM
                0 responses
                32 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 12-13-2024, 08:24 AM
                0 responses
                48 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 12-12-2024, 07:41 AM
                0 responses
                34 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 12-11-2024, 07:45 AM
                0 responses
                46 views
                0 likes
                Last Post seqadmin  
                Working...
                X