# Alternate kneaddata genomes in biobakery workflows

**URL:** <https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172>\
**Category:** bioBakery workflows\
**Created:** [October 19, 2020, 9:01pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172 "2020-10-19T21:01:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![okeydokey](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@okeydokey](https://forum.biobakery.org/u/okeydokey)\
**Post date:** [October 19, 2020, 9:01pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/1 "2020-10-19T21:01:40Z")

</div>

It appears like the kneaddata step of the wmgx or wmgx\_wmtx workflows can’t be run against non-human databases, is that correct? If I use the --qc-options="–reference-db /location/" to specify the mouse database instead of the human database (like I would using kneaddata) I get an error that says:

"Unable to find database KNEADDATA\_DB\_HUMAN\_GENOME. This is the KneadData bowtie2 database of the human genome. This database can be downloaded with Knead Data. Unable to find in default install folders or with environment variable.

I also get an error if I use a workflows environmental variable to specify the mouse genome instead of using the kneaddata variable.

Is there anyway to run these pipelines using the mouse genome in the KneadData step?

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [October 19, 2020, 9:16pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/2 "2020-10-19T21:16:46Z")

</div>

Hello - You should be able to use non-human reference databases with the workflow. We have used this option for our own runs when needed. Sorry to hear you are running into errors. If you add the option `--contaminate-databases <folder>` when running the workflows you can specify the mouse genome location. Alternatively you should be able to change the environment variable too. Please try adding the database option when running and follow up if you continue to have issues.

Thank you,  
Lauren

---

<div class="post-metadata">

**Author:** ![okeydokey](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@okeydokey](https://forum.biobakery.org/u/okeydokey)\
**Post date:** [October 20, 2020, 7:14pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/3 "2020-10-20T19:14:36Z")

</div>

Hi and thanks for the quick reply. I tried that with the following command:

biobakery\_workflows wmgx\_wmtx --dry-run --contaminate-databases /kneaddata/databases/mouse/ --threads 48 --input-metagenome /metagenomics/ --input-metatranscriptome /metatranscriptomics/ --output /workflows\_output/

Here was my error:

> wmgx\_wmtx.py: error: unrecognized arguments: --contaminate-databases /kneaddata/databases/mouse/

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [October 20, 2020, 10:51pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/4 "2020-10-20T22:51:36Z")

</div>

Hi - Thanks for the follow up and sorry for any confusion. The wmgx workflow is the only one with the `--contaminate-databases` option. The wmgx\_wmtx workflow does not have the database option in part because we set different databases for each input type (wmgx and wmtx). We could add a set of custom database options to the workflow and will look at adding this in a future release. For now you should be able to set the following environment variables to provide custom databases:

```auto
$KNEADDATA_DB_HUMAN_GENOME
$KNEADDATA_DB_HUMAN_TRANSCRIPTOME
$KNEADDATA_DB_RIBOSOMAL_RNA

```

The workflow will run the first database on all DNA samples and all databases on all RNA samples.

Thank you,  
Lauren

---

<div class="post-metadata">

**Author:** ![wanghaihua-hub](https://avatars.discourse-cdn.com/v4/letter/w/c68b51/32.png) [@wanghaihua-hub](https://forum.biobakery.org/u/wanghaihua-hub)\
**Post date:** [October 22, 2020, 4:11pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/5 "2020-10-22T16:11:41Z")

</div>

Hi, I used the following command “biobakery\_workflows wmgx --contaminate-databases /apps/users/user01/wanghhh/metagenomic/databases/kneaddata\_database --input rawdata --output workflow\_output”, but still have the error like “Unable to find database KNEADDATA\_DB\_HUMAN\_GENOME. This is the KneadData bowtie2 database of the human genome. This database can be downloaded with KneadData. Unable to find in default install folders or with environment variables.”  
So, how could I fix it? thank you~~

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [October 22, 2020, 6:33pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/6 "2020-10-22T18:33:52Z")

</div>

Hello - Thank you for the detailed post. If you set the environment variable $KNEADDATA\_DB\_HUMAN\_GENOME it will resolve the error you are seeing. You can set it to any database it just needs to be set as a part of the initial workflow installation.

Thank you,  
Lauren

---

<div class="post-metadata">

**Author:** ![lzh1982](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@lzh1982](https://forum.biobakery.org/u/lzh1982)\
**Post date:** [November 19, 2020, 11:54am UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/7 "2020-11-19T11:54:39Z")

</div>

Hi，Would you tell me how to set the environment variables? for example, I have downloaded the corresponding databases in /lizhihua/biobakery\_workflows/kneaddata\_db\_human\_genome. then, $KNEADDATA\_DB\_HUMAN\_GENOME=/lizhihua/biobakery\_workflows/kneaddata\_db\_human\_genome? Thank you very much!

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [November 24, 2020, 9:15pm UTC](https://forum.biobakery.org/t/alternate-kneaddata-genomes-in-biobakery-workflows/1172/8 "2020-11-24T21:15:19Z")

</div>

Hello - It would depend on your default shell. If you are running in bash you would run:  
`$ export KNEADDATA_DB_HUMAN_GENOME=/lizhihua/biobakery_workflows/kneaddata_db_human_genome`

Thank you,  
Lauren
