# bowtie index build error for large genome which is 15GB ( one chromosome in over 2GB)

**URL:** <https://help.galaxyproject.org/t/bowtie-index-build-error-for-large-genome-which-is-15gb-one-chromosome-in-over-2gb/11445>\
**Category:** Uncategorized\
**Tags:** devops-administration, reference-index\
**Created:** [January 10, 2024, 7:03am UTC](https://help.galaxyproject.org/t/bowtie-index-build-error-for-large-genome-which-is-15gb-one-chromosome-in-over-2gb/11445 "2024-01-10T07:03:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naibin\_Duan](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/naibin_duan/32/2515_2.png) [@Naibin\_Duan](https://help.galaxyproject.org/u/Naibin_Duan)\
**Post date:** [January 10, 2024, 7:03am UTC](https://help.galaxyproject.org/t/bowtie-index-build-error-for-large-genome-which-is-15gb-one-chromosome-in-over-2gb/11445/1 "2024-01-10T07:03:18Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/9/9c84ba43e8a1cde32ebb921f6de0ae30f791be4d.png)

Please see the text in detail.

_Building a SMALL index_  
_Error: Reference sequence has more than 2^32-1 characters! Please build a large index by passing the **–large-index** option to bowtie2-build_  
_Error: Encountered internal Bowtie 2 exception (#1)_  
\*Command: /home/galaxy/galaxy-dev/database/dependencies/\_conda/envs/\_\_bowtie2@2.4.4/bin/bowtie2-build-s --wrapper basic-0 --threads 80 /home/galaxy/galaxy-dev/database/objects/b/1/1/dataset\_b11d4bf4-6411-4bae-b0d0-039405fb0c3a\_files/Garlic\_genome.SPLIT.fa Galrlic\_V1\_split \*  
_Deleting “Galrlic\_V1\_split.3.bt2” file written during aborted indexing attempt._  
_Deleting “Galrlic\_V1\_split.4.bt2” file written during aborted indexing attempt._  
_Error building index._

 ![image](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/5/5f6182ede596bae9a9d777f9556355db5ef7eac2.png)

However in this interface, there is no ‘–large index’ option.  
How to add an option for data\_manager\_bowtie2\_index\_builder？

Does this relate to the configuration file data\_manager\_conf.xml of data\_manager\_bowtie2\_index\_builder?

---

<div class="post-metadata">

**Author:** ![Naibin\_Duan](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/naibin_duan/32/2515_2.png) [@Naibin\_Duan](https://help.galaxyproject.org/u/Naibin_Duan)\
**Post date:** [January 10, 2024, 2:07pm UTC](https://help.galaxyproject.org/t/bowtie-index-build-error-for-large-genome-which-is-15gb-one-chromosome-in-over-2gb/11445/2 "2024-01-10T14:07:44Z")

</div>

## looks I find the answer!!

vim /database/shed\_tools/toolshed.g2.bx.psu.edu/repos/devteam/data\_manager\_bowtie2\_index\_builder/9dd107db92c2/data\_manager\_bowtie2\_index\_builder/data\_manager/bowtie2\_index\_builder.py  
--------------\*\*\*\*\*\*\*\*\*\*\*\*  
def build\_bowtie2\_index(data\_manager\_dict, fasta\_filename, params, target\_directory, dbkey, sequence\_id, sequence\_name, data\_table\_names=DEFAULT\_DATA\_TABLE\_NAMES):  
# TODO: allow multiple FASTA input files  
fasta\_base\_name = os.path.split(fasta\_filename)[-1]  
sym\_linked\_fasta\_filename = os.path.join(target\_directory, fasta\_base\_name)  
os.symlink(fasta\_filename, sym\_linked\_fasta\_filename)  
args = [‘bowtie2-build’, **‘–large-index’** , sym\_linked\_fasta\_filename, sequence\_id]  
######### I insert -large-index into this line !!!  
threads = os.environ.get(‘GALAXY\_SLOTS’)  
if threads:  
args.extend([‘–threads’, threads])  
proc = subprocess.Popen(args=args, shell=False, cwd=target\_directory)  
return\_code = proc.wait()  
if return\_code:  
print(“Error building index.”, file=sys.stderr)  
sys.exit(return\_code)  
data\_table\_entry = dict(value=sequence\_id, dbkey=dbkey, name=sequence\_name, path=sequence\_id)  
for data\_table\_name in data\_table\_names:  
\_add\_data\_table\_entry(data\_manager\_dict, data\_table\_name, data\_table\_entry)

now a large genome index is done!

---

<div class="post-metadata">

**Author:** ![Naibin\_Duan](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/naibin_duan/32/2515_2.png) [@Naibin\_Duan](https://help.galaxyproject.org/u/Naibin_Duan)\
**Post date:** [January 10, 2024, 2:20pm UTC](https://help.galaxyproject.org/t/bowtie-index-build-error-for-large-genome-which-is-15gb-one-chromosome-in-over-2gb/11445/3 "2024-01-10T14:20:08Z")

</div>

‘bowtie2\_index\_builder.py’ requires modifications to become compatible with large genomes.

---

<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:** [January 10, 2024, 9:31pm UTC](https://help.galaxyproject.org/t/bowtie-index-build-error-for-large-genome-which-is-15gb-one-chromosome-in-over-2gb/11445/4 "2024-01-10T21:31:07Z")

</div>

Great that you found this! We need people to help with expanding the data manager’s scope in a few places, so any help with this one is welcomed. Please consider posting an issue ticket to the development repository, and even suggesting changes in a PR if you want. The original authors, or the IUC, will work with you on this.

How to find where to propose changes (any tool, not just this one): tool form → Options → See in Toolshed → link to Dev repo.

Thanks for posing back the answer 🙂
