Skip to content

Commit

Permalink
updated task finish_asm to accomodate issue #18
Browse files Browse the repository at this point in the history
  • Loading branch information
vlilanl committed Jun 4, 2024
1 parent 91d0215 commit e6ae99e
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
Binary file modified imports.zip
Binary file not shown.
12 changes: 5 additions & 7 deletions input.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"jgi_metaASM.input_file":["/global/cfs/projectdirs/m3408/ficus/11809.7.220839.TCCTGAG-ACTGCAT.fastq.gz"],
"jgi_metaASM.rename_contig_prefix":"503125_160870",
"jgi_metaASM.proj":"nmdc:503125_160870",
"jgi_metaASM.resource": "NERSC -- perlmutter",
"jgi_metaASM.informed_by": "nmdc:xxxxxx",
"jgi_metaASM.memory": "105G",
"jgi_metaASM.threads": "16"
"jgi_metaAssembly.input_files":["https://data.microbiomedata.org/data/test_data/11809.7.220839.TCCTGAG-ACTGCAT.fastq.gz"],
"jgi_metaAssembly.proj":"nmdc:503125_160870",
"jgi_metaAssembly.memory": "105G",
"jgi_metaAssembly.threads": "16",
"jgi_metaAssembly.shortRead": true
}
4 changes: 2 additions & 2 deletions jgi_assembly.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ workflow jgi_metaAssembly{
String? memory
String? threads
# longReads parameters
Array[File] input_files
Array[String] input_files
String flye_container = "staphb/flye:2.9.2"
String flye_parameters = "--meta -o flye -t 32 --pacbio-hifi"
String smrtlink_container = "bryce911/smrtlink:12.0.0.177059"
Expand Down Expand Up @@ -109,7 +109,7 @@ workflow jgi_metaAssembly{
task finish_lrasm {
input{
input {
File contigs
File bam
File scaffolds
Expand Down
6 changes: 6 additions & 0 deletions labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sample_id": "503125_159845",
"project_id": "503125",
"pipeline": "metaAssembly",
"submitter": "vli"
}
14 changes: 8 additions & 6 deletions shortReads_assembly.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ workflow jgi_metaASM {
# String? outdir
String? memory
String? threads
File? input_file
String? input_file
String proj
String prefix=sub(proj, ":", "_")
String rename_contig_prefix="scaffold"
Expand Down Expand Up @@ -72,7 +72,8 @@ workflow jgi_metaASM {
bam=read_mapping_pairs.outbamfile,
samgz=read_mapping_pairs.outsamfile,
covstats=read_mapping_pairs.outcovfile,
asmstats=create_agp.outstats
asmstats=create_agp.outstats,
bbcms_fastq = bbcms.out
}

# call make_output{
Expand Down Expand Up @@ -104,9 +105,7 @@ workflow jgi_metaASM {
File covstats=finish_asm.outcovstats
File asmstats=finish_asm.outasmstats
File asminfo=make_info_file.asminfo
File bbcms_fastq = bbcms.out
File bbcms_left_fastq = bbcms.out1
File bbcms_right_fastq = bbcms.out2
File bbcms_fastq = finish_asm.outbbcms
}

meta {
Expand All @@ -120,7 +119,7 @@ workflow jgi_metaASM {
task stage {
input{
String container
File? input_file
String? input_file
String memory = "4G"
String target = "staged.fastq.gz"
String output1 = "input.left.fastq.gz"
Expand Down Expand Up @@ -196,6 +195,7 @@ task finish_asm {
File? samgz
File? covstats
File asmstats
File bbcms_fastq
String container
String proj
String prefix
Expand All @@ -217,6 +217,7 @@ task finish_asm {
cat ~{scaffold} | sed ~{sed} > ~{prefix}_scaffolds.fna
cat ~{covstats} | sed ~{sed} > ~{prefix}_covstats.txt
cat ~{agp} | sed ~{sed} > ~{prefix}_assembly.agp
cat ~{bbcms_fastq} | sed ~{sed} > ~{prefix}_bbcms.fastq.gz
## Bam file
samtools view -h ~{bam} | sed ~{sed} | \
Expand All @@ -237,6 +238,7 @@ task finish_asm {
File outsamgz = "~{prefix}_pairedMapped.sam.gz"
File outcovstats = "~{prefix}_covstats.txt"
File outasmstats = "stats.json"
File outbbcms = "~{prefix}_bbcms.fastq.gz"
}

runtime {
Expand Down
15 changes: 15 additions & 0 deletions submit_curl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
#


# zip bundle.zip *wdl
WD=/global/cfs/cdirs/m3408/aim2/dev/kli_training/mg_annotation/

curl --netrc -X POST "https://nmdc-cromwell.freeddns.org:8443/api/workflows/v1" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "workflowSource=@jgi_assembly.wdl" \
-F "[email protected];type=application/json" \
-F "[email protected]" \
-F "[email protected];type=application/json"

0 comments on commit e6ae99e

Please sign in to comment.