# Change the dataset type of all elements of a collection?

**URL:** <https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527>\
**Category:** Uncategorized\
**Tags:** fastqsanger, collections, datatype\
**Created:** [February 14, 2022, 3:40pm UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527 "2022-02-14T15:40:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvanheus](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/pvanheus/32/117_2.png) [@pvanheus](https://help.galaxyproject.org/u/pvanheus)\
**Post date:** [February 14, 2022, 3:40pm UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/1 "2022-02-14T15:40:51Z")

</div>

Hi there

I uploaded some data and organised it into a collection but I noticed that I selected the wrong datatype. Is there a way to change the datatypes of all elements of a collection (and thus have the dataset collection’s type change)?

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [February 14, 2022, 10:48pm UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/2 "2022-02-14T22:48:58Z")

</div>

Hi @pvanheus

There was a new feature introduced into release `21.09` to do this. You’ll need to switch over to the “Beta” history view to use it.

Details are here: [September 2021 Galaxy Release (v 21.09) — Galaxy Project 21.09.1.dev0 documentation](https://docs.galaxyproject.org/en/master/releases/21.09_announce_user.html#collections-beta-history-updates)

Note that this will only work for changing the datatype if there is an existing “convert” tool to do the transformation. Here is an example where I had to convert to from `bed > csv > tabular` – as a direct `bed > tabular` wasn’t available (Why? `bed` format is already within the scope of `tabular` format so there isn’t a specific convert operation for it). [Galaxy | Accessible History | test collection datatype change](https://usegalaxy.org/u/jen/h/test-collection-datatype-change)

Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![pvanheus](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/pvanheus/32/117_2.png) [@pvanheus](https://help.galaxyproject.org/u/pvanheus)\
**Post date:** [February 15, 2022, 5:51am UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/3 "2022-02-15T05:51:00Z")

</div>

Thanks for the tip, but unfortunately that _converts_ data between datatypes, as you said, using a converter tool. In the single-item dataset editor one can change the datatype without running a converter - so e.g. fastq.gz to fastqsanger.gz. So it seems that there still isn’t an option to do what I’m looking for (I uploaded some FASTQ data and it was auto-assigned to fastq.gz when the workflow I wanted to use required fastqsanger.gz). Seems that I’ll have to make a feature request…

---

<div class="post-metadata">

**Author:** ![wm75](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/wm75/32/56_2.png) [@wm75](https://help.galaxyproject.org/u/wm75)\
**Post date:** [February 15, 2022, 5:37pm UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/4 "2022-02-15T17:37:06Z")

</div>

Bulk operations are on the to do list for the beta history, and I’d think that would include format changes, @dannon ?

---

<div class="post-metadata">

**Author:** ![mtekman](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/mtekman/32/752_2.png) [@mtekman](https://help.galaxyproject.org/u/mtekman)\
**Post date:** [February 17, 2022, 9:36pm UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/5 "2022-02-17T21:36:01Z")

</div>

@pvanheus - I had this same problem recently too. My solution involved creating a workflow that then set the output type on the collection.

 ![Screenshot 2022-02-17 at 22-34-51 Galaxy](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/7/7958d3c3cf887cccb1fe532b458a854f632e6f6f.png)

(Edit: though I’m not sure if this invokes the converter or sets the datatype…)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [February 18, 2022, 12:30am UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/6 "2022-02-18T00:30:58Z")

</div>

> [@mtekman](#):
>
> (Edit: though I’m not sure if this invokes the converter or sets the datatype…)

Very clever!! That is directly assigning the datatype, which is what Peter wants to do as well.

I expect that the collection metadata editing functions will have the “Datatype” tab added. It is a popular enhancement request. Related tickets: [12725](https://github.com/galaxyproject/galaxy/issues/12725) && [8013](https://github.com/galaxyproject/galaxy/issues/8013)

---

<div class="post-metadata">

**Author:** ![mtekman](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/mtekman/32/752_2.png) [@mtekman](https://help.galaxyproject.org/u/mtekman)\
**Post date:** [February 18, 2022, 9:32am UTC](https://help.galaxyproject.org/t/change-the-dataset-type-of-all-elements-of-a-collection/7527/7 "2022-02-18T09:32:31Z")

</div>

Looking forward to it!
