🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bionet.software.acedb
Article #170

Re: making a list of sequences in fasta_format

#170
From: Keith Bradnam
Date: Wed, 28 Aug 2002 08:56
121 lines
3891 bytes
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@alg.vf.wau.nl
> 	A.J.A.van.Kampen@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
Technical Details
Message-ID: <Pine.OSF.4.21.0208271200410.21460-100000@caldy.sanger.ac.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!hgmp.mrc.ac.uk!net.bio.net
References: <3D63669C.6030409@freeler.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6d40,4d0d53818111b85
X-Google-Attributes: gidf6d40,public
X-Google-ArrivalTime: 2002-08-28 01:56:45 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!hgmp.mrc.ac.uk!net.bio.net
From: Keith Bradnam <krb@sanger.ac.uk>
Newsgroups: bionet.software.acedb
Subject: Re: making a list of sequences in fasta_format
Date: 28 Aug 2002 09:56:44 +0100
Organization: BIOSCI/MRC Human Genome Mapping Project Resource Centre
Lines: 123
Sender: mod-ace@hgmp.mrc.ac.uk
Approved: BIOSCI Approval Key <biosci-approval-key@net.bio.net>
Message-ID: <Pine.OSF.4.21.0208271200410.21460-100000@caldy.sanger.ac.uk>
References: <3D63669C.6030409@freeler.nl>
NNTP-Posting-Host: mercury.hgmp.mrc.ac.uk
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: niobium.hgmp.mrc.ac.uk 1030525005 25421 193.62.192.80 (28 Aug 2002 08:56:45 GMT)
X-Complaints-To: news@net.bio.net
NNTP-Posting-Date: Wed, 28 Aug 2002 08:56:45 +0000 (UTC)
X-Razor-id: 8104c0cd8316bba2388427582c40582b6d06b633
X-Auth: PGPMoose V1.1 PGP bionet.software.acedb
 iQCVAwUAPWyQSaCIqsWvyF5FAQECYgP/apwN0KpoV3QTslfT96UGkEMw3fwCJEtg
 CIj8iNHMUngEc8LJLgGFR2PpFG5HTUEVb6tu3jyEYh5yMCb04fnALhabrpkBiJWe
 CzIDLxpGA0Ls55r2jZQo1kSYM2xMTkn8SPVp2AxI5Y7PjBU7ivuamtpuyxNrIAl5
 OZBh35vcdzY=
 =rDu2