# Get all reference error

**URL:** <https://forum.biobakery.org/t/get-all-reference-error/3980>\
**Category:** PhyloPhlAn\
**Created:** [August 22, 2022, 7:53am UTC](https://forum.biobakery.org/t/get-all-reference-error/3980 "2022-08-22T07:53:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saras22](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@saras22](https://forum.biobakery.org/u/saras22)\
**Post date:** [August 22, 2022, 7:53am UTC](https://forum.biobakery.org/t/get-all-reference-error/3980/1 "2022-08-22T07:53:36Z")

</div>

Hi @f.asnicar

I was trying to download reference genome for all the genomes using phylophlan\_get\_reference command and I got the following error:

Command used:  
**phylophlan\_get\_reference -g all -o /home/rakesh/PHYLO\_ANALYSIS/PHYLO\_TOL/ -n 1 --verbose 2\>&1 | tee /home/rakesh/PHYLO\_ANALYSIS/logs/phylophlan\_get\_reference.log**

phylophlan\_get\_reference.py version 3.0.18 (27 November 2020)

Command line: /home/rakesh/anaconda3/envs/phylophlan/bin/phylophlan\_get\_reference -g all -o /home/rakesh/PHYLO\_ANALYSIS/PHYLO\_TOL/ -n 1 --verbose

Arguments: {‘get’: ‘all’, ‘list\_clades’: False, ‘database\_update’: False, ‘output\_file\_extension’: ‘.fna.gz’, ‘output’: ‘/home/rakesh/PHYLO\_ANALYSIS/PHYLO\_TOL/’, ‘how\_many’: 1, ‘genbank\_mapping’: ‘assembly\_summary\_genbank.txt’, ‘verbose’: True}  
File “taxa2genomes.txt” present  
File “taxa2genomes\_cpa201901\_up201901.txt.bz2” present  
Output folder “/home/rakesh/PHYLO\_ANALYSIS/PHYLO\_TOL/” present  
File “assembly\_summary\_genbank.txt” present  
Traceback (most recent call last):  
File “/home/rakesh/anaconda3/envs/phylophlan/bin/phylophlan\_get\_reference”, line 10, in   
sys.exit(phylophlan\_get\_reference())  
File “/home/rakesh/anaconda3/envs/phylophlan/lib/python3.10/site-packages/phylophlan/phylophlan\_get\_reference.py”, line 319, in phylophlan\_get\_reference  
get\_reference\_genomes(args.genbank\_mapping, taxa2genomes\_file\_latest, args.get, args.how\_many,  
File “/home/rakesh/anaconda3/envs/phylophlan/lib/python3.10/site-packages/phylophlan/phylophlan\_get\_reference.py”, line 265, in get\_reference\_genomes  
gb\_assembly\_summary = dict([(r.strip().split(‘\t’)[0],  
File “/home/rakesh/anaconda3/envs/phylophlan/lib/python3.10/site-packages/phylophlan/phylophlan\_get\_reference.py”, line 266, in   
(r.strip().split(‘\t’)[19].replace(‘ftp://’, ‘https://’) + ‘/’ +  
IndexError: list index out of range

Please help me resolve this error! Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![f.asnicar](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/f.asnicar/32/196_2.png) [@f.asnicar](https://forum.biobakery.org/u/f.asnicar)\
**Post date:** [September 2, 2022, 3:24pm UTC](https://forum.biobakery.org/t/get-all-reference-error/3980/2 "2022-09-02T15:24:29Z")

</div>

Hi @saras22, thanks for reporting this. Unfortunately, I’m not able to reproduce the error. I run the same command (only changing the output folder) and it is running as expected.  
Considering that PhyloPhlAn says:

> [@saras22](#):
>
> File “assembly\_summary\_genbank.txt” present

and the error:

> [@saras22](#):
>
> (r.strip().split(‘\t’)[19].replace(‘ftp://’, ‘https://’) + ‘/’ +  
> IndexError: list index out of range

is when reading that file, I would suggest you remove the `assembly_summary_genbank.txt` and re-run the command so that the file will be re-downloaded.

Many thanks,  
Francesco
