Skip to content

Commit

Permalink
update wrt core v0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pveber committed May 7, 2022
1 parent fb285b2 commit d363bd2
Show file tree
Hide file tree
Showing 61 changed files with 97 additions and 69 deletions.
3 changes: 2 additions & 1 deletion bistro.opam
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ depends: [
"base64"
"bos"
"dune" {> "1.6"}
"core" {>= "0.12.0"}
"core" {>= "0.15.0"}
"core_unix" {>= "0.15.0"}
"lwt" {>= "3.2.0"}
"lwt_react"
"ocamlgraph" {>= "1.8.7"}
Expand Down
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Features:
base64
bos
(dune (> 1.6))
(core (>= 0.12.0))
(core (>= 0.15.0))
(core_unix (>= 0.15.0))
(lwt (>= 3.2.0))
lwt_react
(ocamlgraph (>= 1.8.7))
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/ChIPQC.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl
open Formats
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/DESeq2.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/alignment_stats.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Formats

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/bed.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/bedtools.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/bowtie.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/bowtie2.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/busco.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/cisa.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
6 changes: 4 additions & 2 deletions lib/bio/cisbp.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
open Core_kernel
open Core
open Bistro

module Sys = Sys_unix

let fetch_pwm_archive : [`cisbp] directory =
Bistro_unix.wget Biotk.Cisbp.pwm_archive_url
|> Bistro_unix.unzip
Expand Down Expand Up @@ -55,7 +57,7 @@ let annotated_motifs =
let threshold = Biotk.Pwm_stats.TFM_pvalue.score_of_pvalue pwm (Biotk.Pwm.flat_background ()) 1e-4 in
let rc_pwm = Biotk.Pwm.reverse_complement pwm in
ignore (
Sys.command (sprintf "echo %s %s %d/%d >> delme" Time.(now () |> to_string) tf_name i n)
Sys.command (sprintf "echo %s %s %d/%d >> delme" Time_unix.(now () |> to_string) tf_name i n)
: int
) ;
{ id ; tf_name ; pwm ; rc_pwm ; threshold ; infos }
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/comparative_genomics.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro

let select_refseq_genomes ~pattern = [%workflow
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/deeptools.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/dnaseq_with_reference_genome.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Biotk
open Formats
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(library
(name bistro_bio)
(public_name bistro-bio)
(libraries biocaml.ez biotk bistro.unix tyxml)
(libraries biocaml.ez biotk bistro.unix core_unix.time_unix core_unix.sys_unix tyxml)
(preprocess (pps ppx_bistro ppx_sexp_conv)))
2 changes: 1 addition & 1 deletion lib/bio/ensembl.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/examples/chen2008.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro_bio
open Biotk
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/fastq.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/fastq_sample.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Biotk
open Formats
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/fastq_screen.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/hisat2.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/idba.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/iqtree.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
4 changes: 3 additions & 1 deletion lib/bio/jaspar.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
open Core_kernel
open Core
open Bistro

module Sys = Sys_unix

let core_vertebrates_non_redundant =
Bistro_unix.wget
~user_agent:{|"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22"|}
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/kallisto.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/macs.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl
open Formats
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/macs2.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl
open Formats
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/meme_suite.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/ncbi_genome.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core

let assembly_summary =
Bistro_unix.wget Biotk.Ncbi_genome.refseq_assembly_summary_url
Expand Down
2 changes: 1 addition & 1 deletion lib/bio/picardtools.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/prokka.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/raxml.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/samtools.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/spades.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/sra_toolkit.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/srst2.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/star.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/subread.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
2 changes: 1 addition & 1 deletion lib/bio/tophat.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down
14 changes: 7 additions & 7 deletions lib/bio/trinity.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl

Expand Down Expand Up @@ -43,9 +43,9 @@ let trinity ?(mem = 128) ?(threads = 4) ?no_normalize_reads ?run_as_paired
option (flag string "--run_as_paired") run_as_paired ;
option (opt "--min_kmer_cov" int) min_kmer_cov ;
option ss_lib_type_option ss_lib_type ;
opt "--CPU" ident np ;
opt "--max_memory" ident (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ;
opt "--output" ident tmp_dest ;
opt "--CPU" Fun.id np ;
opt "--max_memory" Fun.id (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ;
opt "--output" Fun.id tmp_dest ;
] ;
cmd "mv" [
tmp_dest // "Trinity.fasta" ;
Expand Down Expand Up @@ -93,12 +93,12 @@ let insilico_read_normalization ?(mem = 128) ?pairs_together ?parallel_stats ~ma
cmd "$TRINITY_HOME/util/insilico_read_normalization.pl" [
string "--seqType fq" ;
fq_option_template se_or_pe_fq ;
opt "--CPU" ident np ;
opt "--JM" ident (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ;
opt "--CPU" Fun.id np ;
opt "--JM" Fun.id (seq [ string "$((" ; Bistro.Shell_dsl.mem ; string " / 1024))G" ]) ;
opt "--max_cov" int max_cov ;
option (flag string "--pairs_together") pairs_together ;
option (flag string "--PARALLEL_STATS") parallel_stats ;
opt "--output" ident tmp ;
opt "--output" Fun.id tmp ;
]
in
let workflow post =
Expand Down
4 changes: 2 additions & 2 deletions lib/bio/ucsc_gb.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro
open Bistro.Shell_dsl
open Formats
Expand Down Expand Up @@ -143,7 +143,7 @@ let faToTwoBit fa =
]

(* (\* let fetch_sequences (File seq2b) locations = *\) *)
(* (\* let open Core_kernel in *\) *)
(* (\* let open Core in *\) *)
(* (\* Core_extended.Sys_utils.with_tmp ~pre:"gzm" ~suf:".seqList" (fun seqList -> *\) *)
(* (\* Core_extended.Sys_utils.with_tmp ~pre:"gzm" ~suf:".fa" (fun fa -> *\) *)
(* (\* (\\* Write locations to a file *\\) *\) *)
Expand Down
3 changes: 3 additions & 0 deletions lib/engine/db.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
open Core
open Rresult

module Sys = Sys_unix
module Unix = Core_unix

type id = string

let ok_exn = function
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(library
(name bistro_engine)
(public_name bistro.engine)
(libraries bistro bos core lwt.unix re rresult))
(libraries bistro bos core core_unix core_unix.sys_unix lwt.unix re rresult))
2 changes: 1 addition & 1 deletion lib/engine/eval_thread.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core

type 'a t = ('a, Execution_trace.Set.t) Lwt_result.t

Expand Down
2 changes: 1 addition & 1 deletion lib/engine/execution_env.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core
open Bistro_internals

module Unix = Caml_unix
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/execution_trace.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Core_kernel
open Core

module Outcome = struct
type t = [
Expand Down
4 changes: 3 additions & 1 deletion lib/engine/local_backend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ open Core
open Lwt.Infix
open Bistro_internals

module Unix = Core_unix

type t = {
logger : Logger.t ;
db : Db.t ;
Expand Down Expand Up @@ -57,7 +59,7 @@ let eval _ () f x =
(fun () ->
let ic = Lwt_io.of_unix_fd ~mode:Lwt_io.input read_from_child in
Lwt_io.read_value ic >>= fun (res : (unit, string) result) ->
Caml.Unix.kill (Pid.to_int pid) Caml.Sys.sigkill;
Caml_unix.kill (Pid.to_int pid) Caml.Sys.sigkill;
Misc.waitpid (Pid.to_int pid) >>= fun _ ->
Unix.close read_from_child ;
Unix.close write_to_child ;
Expand Down
2 changes: 1 addition & 1 deletion lib/engine/lwt_queue.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Lwt.Infix
open Core_kernel
open Core

type 'a t = {
queue : 'a Queue.t ;
Expand Down
3 changes: 3 additions & 0 deletions lib/engine/misc.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
open Core

module Sys = Sys_unix
module Unix = Core_unix

let digest x =
Md5.to_hex (Md5.digest_string (Marshal.to_string x []))

Expand Down
4 changes: 3 additions & 1 deletion lib/engine/path.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
open Core_kernel
open Core

module Sys = Sys_unix

type t = string list
[@@deriving sexp]
Expand Down
Loading

0 comments on commit d363bd2

Please sign in to comment.