zwdzwd / transvar

TransVar - multiway annotator for precision medicine
Other
118 stars 33 forks source link

record.py format_group grouping settings #37

Closed zmiimz closed 5 years ago

zmiimz commented 5 years ago

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)

zwdzwd commented 5 years ago

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