Skip to content

Commit

Permalink
fix: Allow lower-case bases in sequence validation
Browse files Browse the repository at this point in the history
  • Loading branch information
danieledler committed Jun 24, 2020
1 parent 53798b8 commit 1aa9065
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/typecheckAlignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export const getFinalDataType = (dataTypes) => {

// Valid characters taken from Standard-RAxML (axml.c)
const reInvalidBinary = /[^01-?]/g;
const reInvalidDNA = /[^ABCDGHKMRSTUVWYNOX?-]/g;
const reInvalidAA = /[^ARNDCQEGHILKMFPSTWYVBZX*?-]/g;
const reInvalidGeneric = /[^0123456789ABCDEFGHIJKLMNOPQRSTU?-]/g;
const reInvalidMixed = /[^0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*?-]/g;
const reInvalidDNA = /[^ABCDGHKMRSTUVWYNOX?-]/gi;
const reInvalidAA = /[^ARNDCQEGHILKMFPSTWYVBZX*?-]/gi;
const reInvalidGeneric = /[^0123456789ABCDEFGHIJKLMNOPQRSTU?-]/gi;
const reInvalidMixed = /[^0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*?-]/gi;

export function findInvalidCharacter(code, dataType) {
// Returns the index of the invalid character if found, else -1
Expand Down
6 changes: 6 additions & 0 deletions static/example-files/phylip/test_lower_case_bases.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
5 20
Turkey AAGCTNGGGC ATTTCAGGGT
Salmo_gair aagccttggc AGTGCAGGGT
H_Sapiens ACCGGTTGGC CGTTCAGGGT
Chimp AAACCCTTGC CGTTACGCTT
Gorilla AAACCCTTGC CGGTACGCTT

0 comments on commit 1aa9065

Please sign in to comment.