zwdzwd / transvar

TransVar - multiway annotator for precision medicine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

record.py format_group grouping settings

zmiimz opened this issue · comments

In the record.py file there is
import locale
locale.setlocale(locale.LC_ALL, '') which sets the locale for all categories to the user’s default setting.
Then the numbers in variants are grouped with coma or dot (it depends on user locale)

9:g.69820797C>G . . . chr9:g.69820797C>G/./. inside_[intergenic_between_PTAR1(60,747_bp_upstream)_and_C9ORF135(7_bp_upstream)] CSQN=IntergenicSNV

9:g.69820797C>G . . . chr9:g.69820797C>G/./. inside_[intergenic_between_PTAR1(60.747_bp_upstream)_and_C9ORF135(7_bp_upstream)] CSQN=IntergenicSNV

Could you consider to disable grouping in this case at all?

def format_group(d):
return locale.format('%d', d, grouping=True) <---- here to False?

That could simplify batch processing in parallel for different samples using multiple computer nodes for annotation and parsing afterwards (without worrying about correct locale setting on each specific node)

Good point. Grouping will be disabled in the next release. I hope the output is more consistent this way. Thanks for the feedback!