Skip to content

Commit

Permalink
Add Others database type.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Jan 29, 2018
1 parent 8738c4e commit 924f103
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/main/java/proteomics/TheoSeq/DbTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public DbTool(String db_name, String databaseType) {
header_pattern = Pattern.compile("^>([^\\s]+)[\\s|]+(.+)$");
} else if (databaseType.contentEquals("UniProt") || databaseType.contentEquals("SwissProt")) {
header_pattern = Pattern.compile("^>[^|]+\\|(.+)\\|(.+)$");
} else {
} else if (databaseType.contentEquals("Others")) {
header_pattern = Pattern.compile("^>(.+)$");
}
else {
header_pattern = null;
logger.error("Incorrect database type ({}) in the parameter file.", databaseType);
System.exit(1);
Expand All @@ -44,7 +47,11 @@ public DbTool(String db_name, String databaseType) {
pro_seq_map.put(id, seq.toString());
}
id = head_matcher.group(1).trim();
annotate = head_matcher.group(2).trim();
if (databaseType.contentEquals("Others")) {
annotate = id;
} else {
annotate = head_matcher.group(2).trim();
}
pro_annotate_map.put(id, annotate);
new_pro = true;
} else if (!line.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/parameter.def
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dev = 0 # Output development information.

# Database
db = small+random50.fasta # The protein database.
database_type = UniProt # Different types have different fasta header patterns. Available values: UniProt, SwissProt, TAIR
database_type = UniProt # Different types have different fasta header patterns. Available values: UniProt, SwissProt, TAIR, Others
missed_cleavage = 2 # Maximum number of allowed missed cleavage.
min_precursor_mass = 1000
max_precursor_mass = 12000
Expand Down

0 comments on commit 924f103

Please sign in to comment.