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

Correct blast #39

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
38 changes: 38 additions & 0 deletions lib/bioinfo/blast.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
open Core
open Bistro.Std
open Bistro.EDSL
open Bistro_bioinfo.Std

type db = [`blast_db] directory
let env = docker_image ~account:"pveber" ~name:"ncbi-blast" ~tag:"2.4.0" ()

let db_name = "db"

let makedb ~dbtype:dbtype fa =
let args = match dbtype with
| `Nucl -> string "-dbtype nucl"
| `Prot -> string "-dbtype prot"
in
workflow ~descr:"blast.makedb" [
cmd ~env "makeblastdb" [
opt "-in" dep fa ;
opt "-out" ident (dest // db_name);
args ;
] ;
]

(* Basic blastn*)

let results = "results.blast"
let blastp ?evalue ?(threads = 4) ?outfmt db query = workflow ~descr:"blastp_xml" ~np:threads [
mkdir_p dest ;
cmd "blastp" ~env [
opt "-db" dep db // db_name ;
opt "-query" dep query ;
opt "-out" ident (dest // results) ;
Copy link
Contributor Author

@cecilpert cecilpert Dec 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I just try :
opt "-db" dep db ;
opt "-out" ident dest ;
I have an error message like : Command line argument error: Argument "out". File is not accessible: /bistro/dest. I think blastp needs a file name and not just a directory as output.
I have the same error if I remove mkdir-p dest

option (opt "-evalue" float) evalue ;
option (opt "-outfmt" string) outfmt ;
]
]

let blast_align = selector ["results.blast"]