Thanks Nate. 
           Maybe you could explain how to use/implement composite datatypes so 
I can understand fully how it works?

The mvb file created is just a list of files i.e.
The contents of Test.mvb could be:

a.txt
b.img
c.log

So, to get composite datatypes to "work" do I have to upload "a.txt", "b.img" 
and "c.log" and also "Test.mvb"? If so how does Test.mvb know about "a.txt, 
b.img and c.log" as they will have been renamed as dataset_'id'.dat? The tool 
takes only "Test.mvb" as input and obviously the contents are still "a.txt", 
"b.img" and "c.log".

I don't see how it would work only uploading "Test.mvb" if the contents aren't 
also uploaded at the same time? 

Or am I getting confused? Please can you explain further?

If running the tool on the command line. The Test.mvb file is opened and each 
file is read and operated on and a resultant file containing new files 
returned...

Thanks
Neil


-----Original Message-----
From: Nate Coraor [mailto:n...@bx.psu.edu] 
Sent: Thursday, 4 October 2012 2:09 AM
To: Burdett, Neil (ICT Centre, Herston - RBWH)
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] Uploading composite datatypes.....

On Oct 2, 2012, at 11:44 PM, <neil.burd...@csiro.au> <neil.burd...@csiro.au> 
wrote:

> Hi,
>   I was under the impression that when a composite datatype (basic) file is 
> uploaded then the files contained within the composite file are also uploaded 
> is this not the case?
> 
> I was hoping my script would be able to have a file as an input. The file 
> contains multiple files. Each one would then be examined and outputted in 
> turn...
> 
> my xml file looks like this:
> <tool id="reorient_studies" name="Reorient images">  <description>for 
> CTE surface</description>
>  <!-- <command 
> interpreter="bash">/usr/local/MILXView.12.08.2/BashScripts/CTESurface/
> tools/reorient_studies.sh $input $installDir $outputDir 
> ${os.path.join( input.extra_files_path, '%s.nii.gz' % 
> input.metadata.base_name )} -->  <command 
> interpreter="bash">/usr/local/MILXView.12.08.2/BashScripts/CTESurface/tools/reorient_studies.sh
>  $input $installDir $outputDir  </command>  <inputs>
>    <param format="mvb" name="input" type="data" label="Input File" />
>    <param type="text" name="installDir" value="/usr/local/MILXView.12.08.2/" 
> label="Atlas" />
>    <param type="text" name="outputDir" value="CTE_SURFACE/" 
> label="White Matter" />  </inputs>  <outputs>
>    <data format="input" name="output_mvb" from_work_dir="temp.mvb" />  
> </outputs>
> 
> (mvb is a new datatype i've added)
> 
> datatypes_conf.xml :
> 
> <datatype extension="mvb" type="galaxy.datatypes.data:Mvb" 
> display_in_upload="true"/>
> 
> data.py :
> 
> class Mvb( Text ):
>    MetadataElement( name="base_name", desc="base name for all transformed 
> versions of this genetic dataset", readonly=True, set_in_upload=True)
>    composite_type = 'basic'
>    file_ext="mvb"
>    allow_datatype_change = False
> 
>    def __init__( self, **kwd ):
>        Text.__init__( self, **kwd )
>        #self.add_composite_file( '215_T1_MRI_biasCorr.nii.gz', is_binary = 
> True )
>        #self.add_composite_file( 'VOTE_215_T1_MRI_hard_csf.nii.gz', is_binary 
> = True )
>        self.add_composite_file( '%s.nii.gz', description = 'Input 
> File', substitute_name_with_metadata = 'base_name', is_binary = True )
> 
> However, when I uploaded my backup.mvb file. It uploads the file and 
> contents, but doesn't upload the files listed in the *.mvb file. 
> Should it do this? Otherwise why have a composite datatype, as in this 
> case it's simply acting like a text file

Hi Neil,

Is the mvb file some sort of container that actually contains multiple files in 
one file?  This isn't quite how composite datasets work.  In Galaxy, a 
composite dataset is multiple different files on disk that are referred to as a 
single dataset.

--nate

> 
> Thanks
> Neil
> 
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this and other 
> Galaxy lists, please use the interface at:
> 
>  http://lists.bx.psu.edu/


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to