Question: New data type
0
gravatar for harryln
12 months ago by
harryln10
harryln10 wrote:

Hi, I want to upload an imaging binary data file (*.ibd) which contains the mass spectral data (https://ms-imaging.org/wp/imzml/data-structure/) as input. So in my local instance, I need to add a new data type. The followings are my procedures:

  • In galaxy/config/datatypes_conf.xml, I add <datatype extension="ibd" type="galaxy.datatypes.binary:ibd" mimetype="application/octet-stream" subclass="true" display_in_upload="true" /> and <sniffer type="galaxy.datatypes.binary:ibd" />

  • In galaxy/lib/galaxy/datatypes/binary.py, I add

    class ibd(_Binary ):  
       """ Class describing an ibd file """
       file_ext = "ibd"
    
    Binary.register_sniffable_binary_format("ibd", "ibd", ibd)
    
  • In galaxy/lib/galaxy/datatypes/registry.py, add two lines: 'ibd' : binary.ibd(), and 'ibd' : 'application/octet-stream',

After uploading my ibd file, the data input box shows: No ibd dataset avaible. And also History Pane indicated that the uploaded ibd file is empty with txt format. All of these indicate that the data type ibd is not successfully added. Could someone help me to sort out this problem?

Many thanks.

ADD COMMENTlink modified 11 months ago by foellmelanie20 • written 12 months ago by harryln10

just double checking: - Have you restarted your galaxy server? - can you manually set the format to ibd?

Hans-Rudolf

ADD REPLYlink written 12 months ago by Hotz, Hans-Rudolf1.8k

Dear Hans, yes. I have restarted many times. And I have set the format in my galaxy tool <param name="ibd_file" type="data" format="ibd" label="ibd file" help="This ibd file must be paired with imzML file. Make sure that selected ibd file must have the same file name of selected imzML above." />

ADD REPLYlink written 12 months ago by harryln10

...but can you manually set the format to ibd for a existing history item or using the upload tool?

ADD REPLYlink written 12 months ago by Hotz, Hans-Rudolf1.8k

"class ibd(_Binary ): " is the "_" a typo in your mail?

what happens if you remove the " subclass="true" "

ADD REPLYlink written 12 months ago by Hotz, Hans-Rudolf1.8k

Many thanks for your reply. Yes indeed it's a typo. After changing that, I can add the new data type. Unfortunately the uploaded binary data set is empty indicated by the History pane.

ADD REPLYlink written 12 months ago by harryln10
2
gravatar for foellmelanie
12 months ago by
foellmelanie20
foellmelanie20 wrote:

Hi,

there is no need to develop a new datatype.

The latest Galaxy Version (v17.09) has imzML already included as datatype. As the imzML file consists of two parts, you cannot use the “regular” upload but you need to choose the “composite” one. In the composite upload option you choose “composite type” = imzml. Then you can upload the .imzML file and the .ibd file separately.

I am currently setting up tools for the analysis of mass-spectrometry imaging data on our Galaxy server in Freiburg. You are very welcome to use our Galaxy-platform, you can register and use it for free: https://galaxy.uni-freiburg.de So far, a qualitycontrol tool as well as a preprocessing pipeline (both based on Cardinal) are included, more tools will follow very soon.

I hope that helps, Melanie

ADD COMMENTlink written 12 months ago by foellmelanie20

Dear Melanie, many thanks for your reply. I have upgraded my Galaxy to version of 17.09. So now I can upload imzML (both imzML and ibd) files as a 'composite' file, named as Uploaded Composite Dataset (imzml):

<html><head><title>imzML Composite Dataset </title></head><p/>
<div>This composite dataset is composed of the following files:<p/><ul>
<li><a href="imzml" type="text/plain">imzml (The imzML metadata component.)</a></li>
<li><a href="ibd" type="text/plain">ibd (The mass spectral data component.)</a></li>
</ul></div></html>

But my R code will call a tool which looks for the paired imzml files. The two files must have the same base name and extension 'imzML' and 'ibd', respectively. In other words, the tool(http://www.cs.bham.ac.uk/~ibs/imzMLConverter/#) will call ibd file implicitly based on imzML's base name. I have found the uploaded files are located in ~/galaxy/database/files/000 and two full names are imzml and ibd. My questions are

  • How can I access the directory including the two files?
  • How do I change two files as like: same_base_name.imzML and same_base_name.ibd?

Many thanks again.

ADD REPLYlink modified 12 months ago • written 12 months ago by harryln10
1

Dear Melanie, I have sorted out this problem by digging into galaxy's tools directory. The uploaded composite file's directory is input.extra_files_path. So I can access this directory in my command section and change the file names as I need. Many thanks for your help again. You save me a lot time.

ADD REPLYlink written 12 months ago by harryln10
0
gravatar for foellmelanie
11 months ago by
foellmelanie20
foellmelanie20 wrote:

Hi, I am happy I could help :)

Here you can find the MSI tools, which I have already included into Galaxy: https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools

What tools are you planning to include into Galaxy? Maybe we can coordinate this together. You are welcome to contact me via mail: foellmelanie@gmail.com

Cheers, Melanie

ADD COMMENTlink written 11 months ago by foellmelanie20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 167 users visited in the last hour