Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tbl regex for LoadDataset #85

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dataset/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ func LoadDataset(projectDir string, pdbList string, rsuf string, lsuf string) ([
line := s.Text()
for k, v := range m {
// Handle the restraints
tblRegex := regexp.MustCompile(`(` + k + `).*tbl`)
tblRegex := regexp.MustCompile(`(` + k + `)_.*tbl`)
tblMatch := tblRegex.FindStringSubmatch(filepath.Base(line))
if len(tblMatch) != 0 {
v.Restraints = append(v.Restraints, s.Text())
Expand All @@ -461,6 +461,13 @@ func LoadDataset(projectDir string, pdbList string, rsuf string, lsuf string) ([
}
}

// Check if there is a target without a restraint and display a warning
for _, v := range m {
if len(v.Restraints) == 0 {
glog.Warning("Target " + v.ID + " does not have restraints!")
}
}

// Add the misc PDBs
for _, pdb := range pdbArr {
for k, v := range m {
Expand Down