# Bacteria community and Antibiotic Resistance Gene

**URL:** <https://help.galaxyproject.org/t/bacteria-community-and-antibiotic-resistance-gene/17670>\
**Category:** Uncategorized\
**Tags:** workflow\
**Created:** [April 22, 2026, 11:03am UTC](https://help.galaxyproject.org/t/bacteria-community-and-antibiotic-resistance-gene/17670 "2026-04-22T11:03:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![santatra](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@santatra](https://help.galaxyproject.org/u/santatra)\
**Post date:** [April 22, 2026, 11:03am UTC](https://help.galaxyproject.org/t/bacteria-community-and-antibiotic-resistance-gene/17670/1 "2026-04-22T11:03:39Z")

</div>

Hello everyone,

I am working on metagenomic data from human samples (oral swabs) and I would appreciate guidance on how to properly analyze and integrate two outputs generated in Galaxy.

I have:

1. Bacterial taxonomy output (CAT-like annotation)

- Each record corresponds to contigs annotated with bacterial taxonomy

- Format includes:

2. ARG (antimicrobial resistance gene) output (AMRFinder-like results)

- Each record corresponds to contigs carrying ARGs

- Includes:

I want to perform: 1/ **Bacterial diversity analysis;** 2/ **ARG diversity analysis;** and **want to know which bacteria carry ARG**

However, I am unsure about the best way to handle the data integration step because:

- Contig IDs have slightly different formats between the two outputs (e.g. presence/absence of suffixes like `_1` or `_cir_`)

- I am not sure whether I should match:

**My question is:** What is the recommended way in Galaxy to harmonize contig identifiers between taxonomy and ARG outputs?

Any advice or recommended workflows would be greatly appreciated.

Thank you very much!

---

<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:** [April 22, 2026, 6:11pm UTC](https://help.galaxyproject.org/t/bacteria-community-and-antibiotic-resistance-gene/17670/2 "2026-04-22T18:11:21Z")

</div>

Hi @santatra

If you are concerned about a tool not being able to match up sample and contig identifiers between files, you can adjust the identifiers in one or both files. With computational tools, shorter is usually better anyway! Put all of the mappings into a tabular file you can reference to keep track of this.

Or, sometimes you can use a collection and the collection identifiers hold the sample name, and tools use that instead.

You can also see our workflows for the process. To use directly, or to review how the sample/data labels are handled.

More about each below!

### Text Manipulation

Modify the data files, but same back the original mappings into a tabular file. Example:

```auto
SampleID
ShorterID
LongerID in files from step N
LongerID in files from step Z

```

You could also add in any of the encoded results in the file names to your tabular master sample list, like:

```auto
SampleID
ShorterID
LongerIDN (used in files from step N)
ResultN (presence/absence notation)
LongerIDZ (used in files from step Z)
ResultZ (if you want to track anything from these too)

```

Any text data manipulations you want are likely possible. We have tutorials here that go through some examples. Or, search the tool panel with keywords – the tools will usually contain the common command-line utility name (if you are used to doing it that way). If you will have batches of data, putting your custom manipulations into a mini-workflow will make this go quicker next time, or to include with your reproducibility methods if this is for a publication.

> [@Tabular data manipulation: add a column of data to an existing file!](https://help.galaxyproject.org/t/tabular-data-manipulation-add-a-column-of-data-to-an-existing-file/17622/2):
>
> ### 🎓 **GTN Tutorials**
> 
> - [Hands-on: Data Manipulation Olympics / Data Manipulation Olympics / Introduction to Galaxy Analyses](https://galaxyproject.github.io/training-material/topics/introduction/tutorials/data-manipulation-olympics/tutorial.html)
> - More [GTN Materials Search](https://galaxyproject.github.io/training-material/search2?query=olympics) (query=olympics)

### Collections

If you are using [dataset collections](https://galaxyproject.github.io/training-material/search2?query=collection), the “name” given to data inside the sample files sometimes doesn’t matter. Instead, the **collection identifier** can hold the SampleID and that is enough. But this depends on the tool. Which tool do you plan to use next?

### Workflows

Are you following a tutorial or are you currently using (or plan to use) an ⚙ **[IWC Workflow](https://iwc.galaxyproject.org/)**? Do you want to? I wasn’t sure if you were looking for a workflow for these steps or for the data manipulations? Arbitrary data manipulations are unlikely to be in a stand-alone community workflow (overly custom!) – instead, those are included as intermediate steps for a specific purpose to help tools to chain together – or, not needed at all (collections are enough).

For the full pathway, this is one suggestion and starts from reads to produce data similar to what you have generated. Could be a useful comparison!

- ⚙ **IWC** [Metagenomics Taxonomic and Antibiotic Resistance Gene (ARG) Profiling | IWC](https://iwc.galaxyproject.org/workflow/metagenomic-raw-reads-amr-analysis-main/#diagram)
- Filter **Microbiome** [Intergalactic Workflow Commission](https://iwc.galaxyproject.org/?q=arg&filter=Microbiome)
- Filter **Metagenomics** [Intergalactic Workflow Commission](https://iwc.galaxyproject.org/?q=arg&filter=Metagenomics)

For training, you could also review here at the 🎓 [Galaxy Training Network](https://galaxyproject.github.io/training-material/topics/microbiome/) ( **GTN** ).

- 🎓 **GTN** [Hands-on: Antibiotic resistance detection / Antibiotic resistance detection / Microbiome](https://galaxyproject.github.io/training-material/topics/microbiome/tutorials/plasmid-metagenomics-nanopore/tutorial.html)
- [Microbiome / Tutorial List](https://galaxyproject.github.io/training-material/topics/microbiome/)
- [Learning Pathway: Detection of AMR genes in bacterial genomes](https://galaxyproject.github.io/training-material/learning-pathways/amr-gene-detection.html)

* * *

* * *

I hope this helps to frame what we have! Not all tools are included in a tutorial but can be found in the tool panel with the simple and advanced filters. Most will have help and references on the tool form (scroll down!) and you can ask here with any questions. Hope this helps! Follow up questions are welcome. 🙂
