Fix: minor bug with input verification in write.phylip; clean up formatting#124
Conversation
…formatting and fix documentation
|
Thanks for catching this bug and for cleaning the messy formatting!
Maybe not needed, I agree. This coercion doesn't seem to be supported anyways: This kind of reinforces the idea that one should not try to use a DNAStringSet object where a DNAMultipleAlignment object is expected. Now for the usual nitpicking, sorry 😉: 3 things:
Thanks again, |
|
Thanks! Fixed these points. Good point regarding the error message and on
This makes sense. I've seen people that like the curly braces always being there and people that don't. I usually err on the side of inclusion, but I do prefer this style. |
|
Thanks @ahl27 |
Changes the following:
write.phylipis now fixed. Previously, callingwrite.phylip(DNAStringSet("ATGC"))would simply do nothing and return normally. Previous logic would only perform an action if the object inherits fromMultipleAlignment, and do nothing otherwise. New logic will throw an error if the object does not inherit fromMultipleAlignment, and write the correct data otherwise.MultipleAlignment.R. Cleaned up a lot of trailing space, standardized indents (was previously a mix of 2-space and 4-space indents), cleaned up various other things (e.g.}else{->} else {).readXMultipleAlignment(filepath, format='phylip')was supported; this has been fixed.We could also attempt to coerce the input to
XMultipleAlignmentif it's of typeXStringorXStringSet, but I'm not sure if we need to do that.