You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question. From my understanding the -d and -n argument of disco.py are used to map genes name to species names (for example if my trees had the format gene1_human, I would use -d'_' -n1). However this does not work.
I checked and it is because of this line: gene_to_species = lambda x : args.delimiter.join(x.split(args.delimiter)[:args.nth_delimiter])
which, according to my logic, should simply be: gene_to_species = lambda x : x.split(args.delimiter)[args.nth_delimiter]
Is it a bug or I did not understand properly the two arguments? Thank you very much!
The text was updated successfully, but these errors were encountered:
Yeah, it works as intended. It simply splits on the nth delimiter, then takes everything preceding that split as the species label. I forget exactly why I implemented it this way; I think I may have ran into a dataset where this was necessary for some reason.
It occurs to me though that there really isn't a way to extract a species name from the middle or end of a label, so I should probably address this. I should also probably update the README to be more clear.
Hello! thanks for the very useful tool.
I have a question. From my understanding the
-d
and-n
argument of disco.py are used to map genes name to species names (for example if my trees had the format gene1_human, I would use -d'_' -n1). However this does not work.I checked and it is because of this line:
gene_to_species = lambda x : args.delimiter.join(x.split(args.delimiter)[:args.nth_delimiter])
which, according to my logic, should simply be:
gene_to_species = lambda x : x.split(args.delimiter)[args.nth_delimiter]
Is it a bug or I did not understand properly the two arguments? Thank you very much!
The text was updated successfully, but these errors were encountered: