making a list of sequences in fasta_format
Keith Bradnam
krb at sanger.ac.uk
Wed Aug 28 03:56:45 EST 2002
Hi Tony,
Have you tried using the asDNA function of Aceperl?
The following works for me in extracting all DNA sequences from a group of
sequences:
#!/usr/local/bin/perl5.6.1 -w
use Ace;
$db = Ace->connect(-path => '/wormsrv2/current_DB') || die "Can't
connect\n";
my @seqs = $db->fetch(Sequence => "AH6.*");
foreach $seq (@seqs){
$fasta_seq = $seq->asDNA();
print "$fasta_seq\n";
}
Hope this helps.
Keith
On 22 Aug 2002, Tony van Kampen wrote:
> ls,
>
> I encountered the following problem:
>
> I know how to export a single DNA_sequence in fasta format, but now
> would like to do it batch_wise.
>
> The problem seems to be that ?DNA is a class of the "A"_type.......
>
> I tried with aceperl this:
>
> start of code:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
> use Ace;
>
>
> my $dblocation = "/home/aerts/docs/chickace/chickace";
>
> my $db = Ace->connect(-path => "$dblocation") || die "Could not open
> connection\n";
>
> my @sequences = $db->fetch("Sequence");
>
> foreach my $seq (@sequences) {
> ## Om een lijst te krijgen van alle tags die aan het DNA object hangen.
> my @more_tags = $seq->at('DNA')->tags;
> foreach (@more_tags) { print $_, "\n" }
>
> ## Om de eigenlijke FASTA file aan te maken.
> # if ($seq->DNA) { print ">", $seq, "\n", $seq->DNA, "\n" }
>
> }
>
>
> print Ace->error;
> print $db->error;
>
> end of code
>
> The reply is:
>
> Can't call method "tags" on an undefined value at
> ./GetSequencesFromChickace.pl line 15, <GEN0> line 1.
>
> I also tried tablemaker but then also the acces to a tag in ?DNA is
> denied: youn cannot select a tag in non-B-class: DNA
>
>
>
> Is there a solution?
>
> I'm using Linux Acedb4.9j
>
> cheers,
>
> Tony
> --
> Tony van Kampen
> Bio-informatics specialist
> Wageningen University Animal Sciences
> The Animal Breeding and Genetics group
>
> E-mail: Tony.VanKampen at alg.vf.wau.nl
> A.J.A.van.Kampen at freeler.nl
>
> Telephone: +31 317 483049 (work)
> +31 6 12052457 (mobile)
> +31 026 4426058 (home)
>
> Telefax: +31 317 483929
>
> P.O. Box 338
> 6700 AH Wageningen
> The Netherlands
>
> Visiting address:
> Zodiac, Marijkeweg 40
> 6709 PG Wageningen
> The Netherlands
>
>
~ Keith Bradnam - WormBase group: http://www.wormbase.org/
~
~ The Wellcome Trust Sanger Institute,
~ Hinxton, Cambridge, CB10 1SA, UK. Tel: 01223 494922
More information about the Acedb
mailing list