[InterMine Dev] dev Digest, Vol 81, Issue 10

davies d.s. (dsd2g13) dsd2g13 at soton.ac.uk
Fri Feb 26 17:46:55 GMT 2016


Thanks Justin, I'll give that a go :-)

Daniel Davies
Third year student, BSc Biochemistry

Founder,
The Dorset Constructorium
http://www.constructorium.org

Founder & CEO,
Vulpine Designs Unlimited
http://www.vulpinedesigns.co.uk
Freedom of Form: an evolution revolution

________________________________________
From: dev-bounces at intermine.org <dev-bounces at intermine.org> on behalf of dev-request at intermine.org <dev-request at intermine.org>
Sent: 26 February 2016 12:00
To: dev at intermine.org
Subject: dev Digest, Vol 81, Issue 10

Send dev mailing list submissions to
        dev at intermine.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
or, via email, send a message with subject or body 'help' to
        dev-request at intermine.org

You can reach the person managing the list at
        dev-owner at intermine.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dev digest..."


Today's Topics:

   1. Re: AIC (Alternative Initiation Codon) mapping as a function
      in Intermine (Justin Clark-Casey)
   2. Re: How to instantiate an Item from its identifier?
      (Justin Clark-Casey)
   3. Re: How to instantiate an Item from its identifier? (Sam Hokin)


----------------------------------------------------------------------

Message: 1
Date: Thu, 25 Feb 2016 15:56:31 +0000
From: Justin Clark-Casey <jc955 at cam.ac.uk>
To: dev at intermine.org
Subject: Re: [InterMine Dev] AIC (Alternative Initiation Codon)
        mapping as a function in Intermine
Message-ID: <56CF242F.8070002 at cam.ac.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi Dan,

The query builder is the way someone would usually build a complex query.  Once one is built, then at the bottom middle of the page there are code generation
links (Perl, Python, Java, etc.) that will generate code that can execute the same code via the InterMine webservices.

--
Justin Clark-Casey, Synbiomine/InterMine Developer
http://synbiomine.org
http://twitter.com/justincc

On 24/02/16 13:04, davies d.s. (dsd2g13) wrote:
> Hi Julie
>
> Thanks for your reply and sorry I didn't get back to you sooner.
> I have managed to get Intermine to load a list of the data listed by its Ensembl identifiers from the FASTA headers, as yet without any of the comments from those headers. Each Ensembl identifier comes with a link to the FASTA sequence stored in the clob for that particular header. So in a sense, yes I was able to get some data into the mine, although I am not sure what additional data I need to put in there with it in order to get meaningful search results, particularly for my intended goals.
>
> Before reading your email I had a prod at Templates and the Query Builder, as I wondered whether they can be used to build the complex query required with the appropriate pre-configuration of my mine. A separate script is something I want to consider if that is not possible, code-efficient or practical.
>
> Daniel Davies
> Third year student, BSc Biochemistry
>
> Founder,
> The Dorset Constructorium
> http://www.constructorium.org
>
> Founder & CEO,
> Vulpine Designs Unlimited
> http://www.vulpinedesigns.co.uk
> Freedom of Form: an evolution revolution
>
> ________________________________________
> From: Julie Sullivan <julie at flymine.org>
> Sent: 19 February 2016 11:46
> To: davies d.s. (dsd2g13)
> Cc: dev at intermine.org
> Subject: Re: [InterMine Dev] AIC (Alternative Initiation Codon) mapping as a function in Intermine
>
> Hi Daniel,
>
> 1. DATA IN
>
> Were you able to get your data into your mine? In your last email you
> said you were having problems with the InterMine FASTA data source.
>
> Do you have the error messages? Or were you able to get it to work?
>
> 2. DATA OUT
>
> It seems like you want to query your mine for sequence data then do some
> further manipulation with a script. Is that right?
>
> Here's our documentation on the web service call you can do to retrieve
> sequence information:
>
> http://iodocs.apps.intermine.org/flymine/docs#/ws-fasta-query/POST/query/results/fasta
>
> That example is querying flymine, but you can just replace FlyMine with
> your local InterMine and the query will work. Provided you've loaded
> sequence information successfully.
>
> So I would think you would use Perl/Python/Whatever to run that query,
> get your sequence data, do whatever manipulation is needed - then write
> the results to a file.
>
> Does that sound sensible? Was that what you had in mind?
>
> Cheers
> Julie
>
> On 18/02/16 21:04, davies d.s. (dsd2g13) wrote:
>> I need to make Intermine map arbitrarily found sequences of three
>> letters to text files of DNA code, that is, I need it to find them in
>> the text files at specific locations, and I need it to take the text in
>> the particular paragraph after the spot where it has found them, stick
>> it to the beginning of the next paragraph minus the paragraph's title,
>> and spit the results out in another text file.
>> Not only that, but I need it to pick the three letter codons based on
>> certain parameters.
>> I need it to do this however many times is necessary per gene for a
>> whole list of genes
>> where 'however many times is necessary' is determined by how many
>> criteria-fitting codons there are per gene.
>> The resultant text should be displayed on the web page too and it should
>> be available for follow-up queries. However, at the moment I can't even
>> get it to display any of the data it has.
>> www.intermine.org and intermine.readthedocs.org have sort of helped but
>> I need more brains to throw at this than fit in my head tonight. My
>> deadline to at least know how to do this is Saturday, sorry it's a bit
>> short notice but it is part of my third year dissertation as well as a
>> longer term project for Vulpine Designs Unlimited.
>>
>>
>> Daniel Davies
>> Third year student, BSc Biochemistry
>>
>> Founder,
>> The Dorset Constructorium
>> http://www.constructorium.org
>>
>> Founder & CEO,
>> Vulpine Designs Unlimited
>> http://www.vulpinedesigns.co.uk
>> Freedom of Form: an evolution revolution
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev at intermine.org
>> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>>
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>



------------------------------

Message: 2
Date: Thu, 25 Feb 2016 16:17:28 +0000
From: Justin Clark-Casey <jc955 at cam.ac.uk>
To: dev at intermine.org
Subject: Re: [InterMine Dev] How to instantiate an Item from its
        identifier?
Message-ID: <56CF2918.8050008 at cam.ac.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi Sam.  I might have the wrong end of the stick here.  If I do, a bit more context for this code would be great.  However, when you add an Item to a collection
(e.g. via Item.addToCollection(String name, Item item) then it is only the reference ID that is stored, not the Item object.

If the Item has already been written to the objectstore then it should be available via ObjectStore.getObjectById(Integer id).  Otherwise, I believe you have to
keep your own map of the Items as you've been doing.

--
Justin Clark-Casey, Synbiomine/InterMine Developer
http://synbiomine.org
http://twitter.com/justincc

On 23/02/16 22:13, Sam Hokin wrote:
> Hi, devs. This has to be something folks do all the time, but I'm stumped on the class/method for doing it. I've got a Collection of Items stored in an Item,
> and I'd like to instantiate them. In other words, with an Item bigItem already existing with a Collection called smallItems:
>
> ReferenceList smallItemRefList = bigItem.getCollection("smallItems");
> if (smallItemRefList!=null) {
>      List<String> smallItemRefIdList = smallItemRefList.getRefIds();
>      for (String smallItemRefId : smallItemRefIdList) {
>              // how can I instantiate this SmallItem given its smallItemRefId????
>          }
> }
>
> So far I've been creating lots of maps to store Items separately, but it sure would be nice if I could use the InterMine API to instantiate Items that already
> exist in a Collection!
>
> Thanks!
> Sam
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev



------------------------------

Message: 3
Date: Thu, 25 Feb 2016 09:30:55 -0700
From: Sam Hokin <shokin at ncgr.org>
To: dev at intermine.org
Subject: Re: [InterMine Dev] How to instantiate an Item from its
        identifier?
Message-ID: <56CF2C3F.6020908 at ncgr.org>
Content-Type: text/plain; charset=utf-8; format=flowed

On 02/25/2016 09:17 AM, Justin Clark-Casey wrote:
> Hi Sam.  I might have the wrong end of the stick here.  If I do, a bit more context for this code would be great.  However, when you
> add an Item to a collection (e.g. via Item.addToCollection(String name, Item item) then it is only the reference ID that is stored,
> not the Item object.
>
> If the Item has already been written to the objectstore then it should be available via ObjectStore.getObjectById(Integer id).
> Otherwise, I believe you have to keep your own map of the Items as you've been doing.

You got it, Justin, thanks! The Item in the collection had, in fact, already been written to the object store, but that's an
important fact to keep in mind. ObjectStore.getObjectById(Integer id) is exactly what I'm looking for!

Cheers!
Sam



------------------------------

_______________________________________________
dev mailing list
dev at intermine.org
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev


End of dev Digest, Vol 81, Issue 10
***********************************



More information about the dev mailing list