Skip to content

Commit

Permalink
updated pointfinder db selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheww95 committed Oct 19, 2023
1 parent 07c56d4 commit c73dcb9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions modules/local/select_pointfinder.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,26 @@ process IDENTIFY_POINTDB {
def species_data = species.split('_|\s') // tokenize string
species_data = species_data*.toLowerCase()

def overly_large_number = 100000
def databases = []
// tokenize database options
def shortest_entry = overly_large_number
for(i in params.staramr.point_finder_dbs){
def db_tokens = i.split('_|\s')

for(g in db_tokens){
def tok_size = g.size()
if(tok_size < shortest_entry){
shortest_entry = tok_size
}
}

databases.add(db_tokens*.toLowerCase())
}

// Remove spurious characters and strings that may affect database identification e.g. Entercoccus_B -> it would get rid of the B
species_data = species_data.findAll { it.size() >= shortest_entry }

def db_opt = null

// Find exact match
Expand Down
2 changes: 1 addition & 1 deletion modules/local/staramr.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ process STARAMR {
if(db){
db_ = "-d $db"
}else{
log.info "Using default database in StarAMR"
log.info "Using default database in StarAMR for ${meta.id}"
}


Expand Down

0 comments on commit c73dcb9

Please sign in to comment.