Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Sequence from Genbank file

    Hi,
    I used to usethis code to download sequence from genabnk ,now bioperl complains about sequence is empty, do yiu know if gen bank structure has been changed?
    use Bio::SeqIO;
    use Bio::Seq;
    use Bio:B::EUtilities;


    @refSeqIDs=qw(NC_000915.1 NC_017379.1 NC_017371.1 NC_017354.1);
    foreach my $refSeqIDs (@refSeqIDs){
    my $factory = Bio:B::EUtilities->new(-eutil => 'efetch',-db=> 'protein',- rettype => 'gb',
    -email => '[email protected]',-id=> $refSeqIDs);
    my $rawfile = "$refSeqIDs.gbk";
    $factory->get_Response(-file =>"$refSeqIDs.gbk");
    my $seqio_object = Bio::SeqIO->new(-format=>"Genbank",-file =>"$refSeqIDs.gbk");
    while ( my $seq_object=$seqio_object->next_seq){
    $sequence=$seq_object->seq;
    print ("$sequence\n");
    }
    }

  • #2
    Originally posted by Shaq View Post
    Hi,
    I used to usethis code to download sequence from genabnk ,now bioperl complains about sequence is empty, do yiu know if gen bank structure has been changed?
    Code:
    use Bio::SeqIO;
    use Bio::Seq;
    use Bio::DB::EUtilities;
    
    
        @refSeqIDs=qw(NC_000915.1 NC_017379.1 NC_017371.1 NC_017354.1);
        foreach my $refSeqIDs (@refSeqIDs){
            my $factory = Bio::DB::EUtilities->new(-eutil   => 'efetch',-db=> 'protein',-  rettype => 'gb',
                                               -email   => '[email protected]',-id=> $refSeqIDs);
            my $rawfile = "$refSeqIDs.gbk";
            $factory->get_Response(-file =>"$refSeqIDs.gbk");
            my $seqio_object = Bio::SeqIO->new(-format=>"Genbank",-file =>"$refSeqIDs.gbk");
            while ( my $seq_object=$seqio_object->next_seq){
                $sequence=$seq_object->seq;
                print ("$sequence\n");
            }
        }
    The RefSeq accessions you are supplying are for chromosomes (i.e. nucleotide sequences) but you are querying the protein database. Change:

    Code:
    -db => 'protein'
    
    to 
    
    -db => 'nuccore'
    The 'gb' return type (rettype) will only return the header and feature portions of the genbank file, not the full record with sequences. Change:

    Code:
    -rettype => 'gb'
    
    to
    
    -rettype => 'gbwithparts'

    Comment


    • #3
      Yes , it indeed fixed the problem. Thanks

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin


        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist on Modified Bases...
        Yesterday, 07:01 AM
      • seqadmin
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      39 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      41 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      35 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      55 views
      0 likes
      Last Post seqadmin  
      Working...
      X