bebatut / enasearch

A Python library for interacting with ENA's API
http://bebatut.fr/enasearch
MIT License
22 stars 6 forks source link

Support comma separated --fields a,b,c #10

Closed tseemann closed 7 years ago

tseemann commented 7 years ago

From #6 i see you need to use --fields multiple times, one per column you want.

This is very verbose. I would much rather use --fields f1,f2,f3 etc.

You could still support the old multi field syntax but combine it with this one. The comma , is guaranteed to not be in any ENA field names so it would backward compatible.

bebatut commented 7 years ago

It is already supported :)

enasearch retrieve_run_report \
   --accession PRJNA275974 \
   --fields run_accession,fastq_ftp \
   --file results

will give the same results as

enasearch retrieve_run_report \
   --accession PRJNA275974 \
   --fields run_accession \
   --fields fastq_ftp \
   --file results

But I added more information in the help