|
Posted
over 11 years
ago
by
Mark A Jensen
_______________________________________________
Bioperl-l mailing list
Bioperl-l< at >mailman.open-bio.org
http://mailman.open-bio.org/mailman/listinfo/bioperl-l
|
|
Posted
over 11 years
ago
by
Torsten Seemann
I don't think you mean to use the "less" command. Try one of these:
% cat try.fa | perl ./fastaLen.pl
or
% perl ./fastaLen.pl < try.fa
|
|
Posted
over 11 years
ago
by
Haiyan Lin
Hi, Paul,
Thanks for your quick replay and advice. Soryy for my late feedback, I can't send maill in my location yesterday. I have tried your method. But
it complains that
------------------------------------
[linhy< at >bioinfo1 Script]$
... [More]
less try.fa | perl ./fastaLen.pl
Name "main::DATA" used only once: possible typo at ./fastaLen.pl line
42.
Use of uninitialized value in print at ./fastaLen.pl line 49.
------------------------------------
I had also tried the "-fh=>\*STDIN", and "-fh=><>",according to the
documentation returned by "perldoc Bio::SeqIO" at termminal, but I still
haven't got I want.Thanks again.
... ...
Bio::SeqIO->new()
$seqIO = Bio::SeqIO->new(-file => 'filename',
-format=>$format);
$seqIO = Bio::SeqIO->new(-fh => \*FILEHANDLE,
-format=>$format);
$seqIO = Bio::SeqIO->new(-format => $format);
... ...
-fh You may provide new() with a previously-opened filehandle.
For example, to read from STDIN:
$seqIO = Bio::SeqIO->new(-f [Less]
|
|
Posted
over 11 years
ago
by
Haiyan Lin
Hi, Paul,
Thanks for your quick replay and advice. I have tried your method. But
it complains that
------------------------------------
[linhy< at >bioinfo1 Script]$ less try.fa | perl ./fastaLen.pl
Name "main::DATA" used only once: possible
... [More]
typo at ./fastaLen.pl line
42.
Use of uninitialized value in print at ./fastaLen.pl line 49.
------------------------------------
I had also tried the "-fh=>\*STDIN", and "-fh=><>",according to the
documentation returned by "perldoc Bio::SeqIO" at termminal, but I still
haven't got I want.Thanks again.
... ...
Bio::SeqIO->new()
$seqIO = Bio::SeqIO->new(-file => 'filename',
-format=>$format);
$seqIO = Bio::SeqIO->new(-fh => \*FILEHANDLE,
-format=>$format);
$seqIO = Bio::SeqIO->new(-format => $format);
... ...
-fh You may provide new() with a previously-opened filehandle.
For example, to read from STDIN:
$seqIO = Bio::SeqIO->new(-fh => \*STDIN);
Note that you must pass filehandles as referen [Less]
|
|
Posted
over 11 years
ago
by
Paul Cantalupo
Hi Haiyan,
You need to use the '-fh' option in Bio::SeqIO new and have it use Perl's
DATA filehandle like so:
my $in = Bio::SeqIO->new(-fh => \*DATA, -format => 'fasta');
This was taken from
... [More]
http://perldoc.perl.org/perldata.html#Special-Literals:
"Text after __DATA__ may be read via the filehandle PACKNAME::DATA , where
PACKNAME is the package that was current when the __DATA__ token was
encountered."
Good luck,
Paul
Paul Cantalupo
University of Pittsburgh
On Sat, Jul 12, 2014 at 8:35 AM, Haiyan Lin <linhy0120< at >gmail.com> wrote:
_______________________________________________
Bioperl-l mailing list
Bioperl-l< at >mailman.open-bio.org
http://mailman.open-bio.org/mailman/listinfo/bioperl-l [Less]
|
|
Posted
over 11 years
ago
by
Haiyan Lin
Hill, dear perlers,
I‘m trying to use Bio::SeqIO to read Fasta sequence from pipe, or < at >ARGV,
like "while (<>) {....}". After several trier and error, I'm failed and
need to ask for herp from you. Could you please help me to check
... [More]
or try
following code?
Thanks in advance.
---------------------------------------
use Bio::SeqIO ;
use Statistics::Descriptive ;
my %opt = () ;
my $sta = Statistics::Descriptive::Full->new();
##### here is the key, I think.
my $in = Bio::SeqIO->new(-format=>"Fasta");
while(my $s = $in->next_seq()){
$sta->add_data($s->length()) ;
}
print $sta->sum() if $opt{sum} ;
__DATA__
AGAGAGAGA
ATATATAT
-----------------------------------------------
Regards
Haiyan
_______________________________________________
Bioperl-l mailing list
Bioperl-l< at >mailman.open-bio.org
http://mailman.open-bio.org/mailman/listinfo/bioperl-l [Less]
|
|
Posted
over 11 years
ago
by
Fields, Christopher J
NCBI recently modified the URL for eutils, and it’s possible this wasn’t changed in the module. I’ll try to have a look.
chris
On Jul 10, 2014, at 11:21 PM, Cacau Centurion <cacaucenturion2< at >gmail.com<mailto:cacaucenturion2< at
... [More]
>gmail.com>> wrote:
Hi all,
I was told the following message when trying to use Bioperl.
------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Can't query website: 500 Can't connect to www.ncbi.nih.gov:80<http://www.ncbi.nih.gov/> (Bad hostname)
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/share/perl5/Bio/Root/Root.pm:368
STACK: Bio::DB::Taxonomy::entrez::get_taxonids /usr/local/share/perl5/Bio/DB/Taxonomy/entrez.pm:472<http://entrez.pm:472/>
I use Bio::SearchIO and Bio::DB::Taxonomy in my script. It used to work properly but has met the problem recently. Does anyone know why?
Yours,
Cacau
_______________________________________________
Bioperl-l mailing list
Bioperl-l< at >mailman.open-bio.org<mailto:Bioperl-l< at >mailman.open-bio.org>
http://mailman.open-b [Less]
|
|
Posted
over 11 years
ago
by
firoz.imtech< at >gmail.com
I have uploaded genomic fasta sequence and GFF3 file into local mysql
database using "bp_seqfeature_load.pl". Now, I want to
extract sequence from position 8966215-8966961 on "+" strand of Chromosome
I, and print only the mRNA segment between
... [More]
8966215-8966961. If there are
many transcripts/isoforms found between these position, print each isoform
sequences with name and position as fasta format. Could you please tell me
what is the best approach to do it for it. My code does not work well.
Thanks
#!/user/bin/perl
use strict;
use warnings;
use Bio::Seq;
use Bio::SeqIO;
use Bio::SeqFeatureI;
use Bio::DB::SeqFeature::Store;
use Bio::DB::SeqFeature::Segment;
my < at >features;
my $db = Bio::DB::SeqFeature::Store->
new(-adaptor=> 'DBI::mysql',
-dsn=> '..',
-user=> '..',
-pass=> '..',
);
my < at >foo = $db->features(-seq_id =>'I',-start=>'8966215',-end=>'8966961',
-strand =>'+1',
-type => 'mRNA',
);
for my $f(< at >foo){
print ">",$->name,"_",$f->start,"_",$f->end,"\n";
print $f->dna,"\n";
}
exit;
______________ [Less]
|
|
Posted
over 11 years
ago
by
Ki Baik
I'm trying to index a large fasta file that I downloaded from NCBI's ftp
site. The size of the fasta file is 700GB. I'm trying to use Bio::DB::Fasta
to index this file. When the index file hits around 10GB, it seems to hang.
I'm wondering if there is
... [More]
a limit on the fasta file size it can index.
Also, how does Bio::DB::Fasta compare to Bio::Index::Fasta? Is one better
for large fasta files? Are there any other indexing schemes I can use
instead of these modules? Any information would be appreciated.
Thanks,
KB
_______________________________________________
Bioperl-l mailing list
Bioperl-l< at >mailman.open-bio.org
http://mailman.open-bio.org/mailman/listinfo/bioperl-l [Less]
|
|
Posted
over 11 years
ago
by
Jason Stajich
I am not sure I can help you at this time, but I would encourage you to use
the mailing list for assistance.
There is nothing inherent in the tool for doing anything with exons but if
you want to print a feature in GFF format I would look at
... [More]
Bio::Tools::GFF
or Bio::FeatureIO (if that still works)
Another thing in this example is to change 'fasta' to 'genbank' for the
$seqout object so you can see the feature annotated in the sequence in
genbank format.
Jason Stajich
jason< at >bioperl.org
http://bioperl.org/wiki/User:Jason
http://twitter.com/hyphaltip
On Tue, Jul 1, 2014 at 12:18 PM, Firoz Ahmed <fa49< at >nyu.edu> wrote:
_______________________________________________
Bioperl-l mailing list
Bioperl-l< at >mailman.open-bio.org
http://mailman.open-bio.org/mailman/listinfo/bioperl-l [Less]
|