[Biophp-dev] Little suggestion for fasta.inc.php

S Clark biophp-dev@bioinformatics.org
Fri, 15 Oct 2004 06:58:41 -0600


I'm on the road, and have to move quick before I miss my plane,=20
but wanted to post a QUICK answer - longer, more "full" answer to
follow later on...

The update to the fasta import module looks like a good idea - I'll
get it committed once I'm home again.  Thanks!

To get access as a "developer" you'll need to have a login name on
bioinformatics.org.  Then I just add you to the list of official
developers and there you go...

As far as which of the "biophp" sites is the "official" one...
=2E..that's a bit of a complex question.  The SHORT answer is that
there were two "accidentally independent" BioPHP projects started up
at the around the same time - Serge Gregorio's predates the one that
I started up by at least two weeks.  Serge started his project as
GenePHP and then registered the BioPHP.net domain and moved his site
there.  Serge's project is more focussed on quick, self-contained
scripts for re-use rather than code "objects" for building new
applications (which is more the focus of the project I had started up
on bioinformatics.org). There is also a "biophp.org" site, which was
pre-emptively registered by someone in (as I recall) Norway, which=20
was to host code for an annotations database.  It sat dormant for quite
some time, but last time I checked there was a search application of some
kind there...but no publically available code that I can find.=20

The mailing list and CVS are both hosted by the bioinformatics.org site,=20
and contains a combination of code from Serge, myself, and Nico Stuurman.
Serge has some additional scripts on his site as well.  So...which site is
the "official" site depends on what you're looking for.   (Confusing, I=20
know...)

Again - will update CVS with your suggested code ASAP.  Once you've
got a login on bioinformatics.org let me know, and I'll get you=20
added so that you've got direct access.  Must fly now...

Thanks

Sean=20


On Friday 15 October 2004 02:57 am, Frederic.Fleche@aventis.com wrote:
> Hello biophp group,
>
> I am starting the embl export module.
> I would like to do a little suggestion concerning fasta.inc.php
>
> I think it would be useful to replace code1 by code2 to treat the case of
> fasta sequence from NCBI in order to get more information at once from the
> >defline
>
> ############## start code 1################
> function fetchNext()
>     {
>         $record=3DArray(); //for returning results
>         if($this->next_label) {
>             list($id,$sequence)=3D$this->findNextLabel();
>             $record['id']=3D$id;
>             $record['sequence']=3D$sequence;
>             return $record;
>         }
>         else {
>             //no more records in file
>             return false;
>         }
>     }
>
>
> ############## end code 1################
>
> ############## start code 2################
> function fetchNext()
>     {
>         $record=3DArray(); //for returning results
>         if($this->next_label) {
>             list($id,$sequence)=3D$this->findNextLabel();
>             //treat the Defline used at NCBI eg
>             //>gi|42794768|ref|NM_002576.3| Homo sapiens
> p21/Cdc42/Rac1-activated kinase 1 (STE20 homolog, yeast) (PAK1), mRNA
> if(ereg("^gi", $id)) {
>             $id =3D substr($id, 3); //take off "gi|"
>             list($id, $db, $accession_version, $definition) =3D explode("=
|",
> $id); list($accession, $version) =3D explode(".", $accession_version);
> $record['ncbi_gi_id']   =3D$id;
>             $record['id']           =3D$accession;
>             $record['accession']    =3D$accession;
>             $record['version']      =3D$version;
>             $record['definition']   =3D$definition;
>             }
>             else {
>             $record['id']=3D$id;
>             }
>             $record['sequence']=3D$sequence;
>             return $record;
>         }
>         else {
>             //no more records in file
>             return false;
>         }
>     }
>
>
> ############## end code 2################
>
>
> By the way how is it possible to append some code I think usefull for oth=
er
> biophp addicted. Thanks in advance.
> By the way what is the officiel website of BIOPHP ?
>
> Thanks in advance for any response.
>
> regards,
>
> Fred
> -----Message d'origine-----
> De : biophp-dev-admin@bioinformatics.org
> [mailto:biophp-dev-admin@bioinformatics.org]De la part de S Clark
> Envoy=E9 : jeudi 1 juillet 2004 18:51
> =C0 : biophp-dev@bioinformatics.org
> Objet : Re: [Biophp-dev] Question
>
>
> In order to add code to the CVS tree at bioinformatics.org, you'll need
> a bioinformatics.org login name, and I'll need to add it to the
> developers list...and that's about it.  (The instructions for CVS itself
> are on the bioinformatics.org website).  If you already have a
> bioinformatics.org login (or as soon as you've got one) let me know and
> I'll add you to the developer list.
>
> We DO have import and export frameworks ready for initial use, but the
> only export module currently written is a simple FASTA example.  If you
> had time to add a Genbank and/or embl format module in the same style to
> add to the export section that'd be very helpful!  Take a look at
> seqIOExport.inc.php and exporters/export_fasta.inc.php - that should
> (hopefully) show how an "export_genbank.inc.php" class should be
> structured (comments and suggestions, as always, are welcome...)
> The current code is (for the moment) actually residing in the "genephp"
> section.  Reorganization under the biophp section should happen Real Soon
> Now. (The whole "two different-but-cross-pollinating projects with the sa=
me
> name" thing IS a bit confusing...)
>
> We may be really quiet right now (probably a combination of work and scho=
ol
> hitting us all again - that's MY excuse, anyway) but we're not dead yet...
>
> Thanks!
>
> Sean
>
> P.S. I'm not sure about getting 24 extra hours in the day - I have a
> sneaking suspicion that the work day would just expand to compensate.
> That kilo of that pure laboratory-grade Caffeine in the chemical supply
> catalogs looks more appealing all the time...
>
> On Thursday 01 July 2004 01:30 am, Frederic.Fleche@aventis.com wrote:
> > Hello ,
> > I was busy during the last months so my Locuslink file is still under
> > construction, by the way, what is the way if I want to append my code to
> > this directory :
> >
> >
> > http://bioinformatics.org/cgi-bin/cvsweb.cgi/biophp/
> > My question is : Does any one have a biophp module to automatically
> > convert a fasta file into an embl or genbank file. Actually I use Biope=
rl
> > to do that but I would be glad to do all in PHP. If it doesn't exist a
> > solution yet I will try to take the time to build it. Ha It would be
> > great if the days were 24 hours longer !!!!!!!
> >
> >
> > Thanks in advance
> > Fred
>
> _______________________________________________
> Biophp-dev mailing list
> Biophp-dev@bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biophp-dev
> _______________________________________________
> Biophp-dev mailing list
> Biophp-dev@bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biophp-dev