Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 21 22:21
    bentsherman commented #2266
  • Jan 21 21:58
    bentsherman synchronize #2584
  • Jan 21 21:58

    bentsherman on issue-2161

    Fixed formatting error Signed-… (compare)

  • Jan 21 21:56
    bentsherman review_requested #2585
  • Jan 21 21:56
    bentsherman labeled #2585
  • Jan 21 21:56
    bentsherman opened #2585
  • Jan 21 21:53

    bentsherman on issue-1845

    Added priorityClassName pod opt… (compare)

  • Jan 21 20:56
    bentsherman commented #2161
  • Jan 21 20:54
    bentsherman synchronize #2584
  • Jan 21 20:54

    bentsherman on issue-2161

    Add securityContext k8s option … (compare)

  • Jan 21 20:42
    bentsherman labeled #2584
  • Jan 21 20:42
    bentsherman review_requested #2584
  • Jan 21 20:42
    bentsherman opened #2584
  • Jan 21 20:41

    bentsherman on issue-2161

    Add securityContext pod option … (compare)

  • Jan 21 20:38
    bentsherman commented #2161
  • Jan 21 17:48
    bentsherman commented #2424
  • Jan 21 17:34
    bentsherman unlabeled #1355
  • Jan 21 17:34
    bentsherman unlabeled #1355
  • Jan 21 17:01
    mguinin synchronize #2569
  • Jan 21 17:00
    mguinin commented #2569
Paul Cantalupo
@pcantalupo
I'm having problems pulling a github repo with nextflow. The repo is private and part of an Organization of which I am an Owner. I created an SCM file with my personal username and am able to pull personal private repos with nextflow pull. But when I try to pull a private Organizational repo, I get the following: Remote resource not found: https://api.github.com/repos/PATH/TO/contents/main.nf. What am I doing wrong?
xmzhuo
@xmzhuo

Hey All,
I have a error relate to nextflow azurebatch. The first process using a default D4_v3 vm work alright, but the second process I fail to request a larger vm (I set it in queue, but apparently, it is not working, do I make some naive mistake?)
'''

Error executing process > 'secondprocess'

Caused by:
Cannot find a VM for task 'secondprocess' matching this requirements: type=Standard_D4_v3, cpus=16, mem=14 GB, location=eastus
'''

The config file I used:

process {
       executor = 'azurebatch'
}

docker {
    enabled = true
}

azure {
  batch {
    location = 'eastus'
    accountName = 'xxxbatch'
    accountKey = 'xxx'
    autoPoolMode = true
    allowPoolCreation = true 
    deletePoolsOnCompletion = true 
    deleteJobsOnCompletion = true 
    pools {
        small { 
            autoScale = true
            vmType = 'Standard_D4_v3'
            vmCount = 5
            maxVmCount = 50
        }    
        large { 
            autoScale = true
            vmType = 'Standard_D16_v3'
            vmCount = 5
            maxVmCount = 50
        }    
    }
  }
  storage {
    accountName = "xxx"
    accountKey = "xxx"
  }
}

process {
    withName: firstprocess {
        queue = 'small'
    }
   withName: secondprocess {
        queue = 'large'
    }
}
Greg Gavelis Code Portfolio
@ggavelis
Hi all, Simple question: I'm trying to create a channel from a list of tuples. val(sample_id) and path(input_file). Though I've check that the input file exists I am encountering errors ['path value cannot be null.'] Does anyone know what is wrong with my syntax? https://pastebin.com/YbSG28a3. BTW: Are tuples even the best approach for this? Since the sample_id string is embedded in the path to the input_file, shouldn't there be a way to extract the sample_id from file_path?
3 replies
Hugues Fontenelle
@huguesfontenelle
Hello @pditommaso and friends :-)
I'm wondering, is there any reason with the cpus directive is not used with the local executor? (using the --cpus docker params) After all, the Docker param --memory is used.
10 replies
Matteo Schiavinato
@MatteoSchiavinato
I have a question that perhaps it isn't very complicated to answer: is it possible to pass to nextflow a dataframe of input files / information to read (e.g. one sample per line) instead of passing paths in multiple channels and then combining them in a single tuple? I was surprised not to find much about it online, so I wondered if the option existed or not.
4 replies
Bede Constantinides
@bede
Hi all, I'm using a shared system where homedirs have quotas, and keep getting disk quota errors with nextflow run, despite specifying an unquota'd path with -w aka -work-dir. Any ideas? In this thread, Paolo suggests -w is the solution… https://groups.google.com/g/nextflow/c/401Tp_6H57k/m/va8ACNeTAQAJ
2 replies
$ nextflow run nf-core/viralrecon -w /users/xxx/test --help
N E X T F L O W  ~  version 21.04.0
Pulling nf-core/viralrecon ...
Disk quota exceeded
Bede Constantinides
@bede
Solution: set NXF_ASSETS to a path without a quota
Ignacio Eguinoa
@ieguinoa
Hi all, I was wondering if there is any resource to help parsing a nextflow file/s into a tree of the syntax elements (AST), ideally using Python. I'm working on a small tool that tries to parse some metadata from the process, channels, etc and need to parse the workflow definition into objects.
similar to what the javalang packages does in python to parse generic Java code (https://pypi.org/project/javalang/)
George Seed
@georgeseed_twitter
So, I've got a channel that reads my samplesheet and grabs the second column, and counts how many unique elements it has:
lane_calc
        .map{it -> [it[2]]}
        .flatten()
        .unique()
        .count()

How can I use this as the 'size' part of a groupTuple? I tried:

aligned_bams
        .groupTuple(by:0,size:lane_calc)

But it did not like it - complained about the value type etc. All thoughts gladly received!

George Seed
@georgeseed_twitter
Re. my post last night, the solution posted here nextflow-io/nextflow#1702 does work - for some reason - so that's nice.
Vlad Kiselev
@wikiselev
I have a channel with tuples consisting of some files and a value. I would like to run a process on this channel. Specifically, I'd like to repeat the process for each value (which is part of the input tuple) and I would also like to .collect() the files from each tuple at the same time. Anyone has done this before? I've already read about each and combine, so my input channel is of the right format. The problem I have is .collect() - not sure how to incorporate it in the input tuple.
3 replies
Wenhui Wu
@wwu7_gitlab
@robsyme Hi Robert, may I ask how you set the NCBI_API_KEY environment variable. I set it in my .bash_profile, but it doesn't seem to work for nextflow. Thanks!
Michael Bale
@michaelbale
Is there a way to have nextflow set the publishDir to an s3 bucket from not aws batch?
4 replies
Toni Hermoso Pulido
@toniher
Good morning! Is it possible to generate a DAG dot file without the need of running a whole pipeline?
10 replies
Szymon Szyszkowski
@PROJECT-DEFIANT
Hello Everyone, I have a nf pipeline running on local server, pipeline logs the ABORTED signal when logging with the nextflow log, but I can not find out the reason to this failure message, could You provide me some explanation to it ?
Matthew
@SamThePsychoticLeprechaun

Hi, in DSL2, do functions allow the passing in of channels? I was hoping to clean up a workflow where a similar sequence of operations is applied to channels, but it looks like channels passed into functions are demoted to plain Java collections.

The error reads:

No signature of method: java.util.LinkedHashMap.collectFile() is applicable for argument types: (LinkedHashMap, Script_77e02758$_collect_file_tuples_closure1) values: [[storeDir:null, sort:hash], Script_77e02758$_collect_file_tuples_closure1@54e2fe]
1 reply
UchicagoZchen138
@UchicagoZchen138
hey guys newbie here who's trying to get a quick proof of concept for using nextflow. I've some questions and hope people could give me some guidance (^-^)
1) After a run, does nextflow do any sort of automatic cleanup to its persistent volume claim if we're using kubernetes.
Chris Wright
@chrisnrg_twitter
I'm having trouble implementing a particular data flow pattern in Nextflow, essentially tasks being block by non-dependent calculations when a channel requires grouping on a key. A full example is in the gist below:
https://gist.github.com/cjw85/d334352e49ddd2e8bf2bd8e3891f3fe5
Central to this is not knowing how to use the items in one channel to allow the non-blocking grouping of another channel.
1 reply
Arijit Panda
@arpanda
I am trying to run a SGE job using current environment setting. In normal SGE code, -V parameter is used. can someone suggest what is the nextflow option to enable that option. Thanks
1 reply
gianmore
@gianmore
Hi all. I'm making a config file to specify error strategies for different processes in my pipeline. For one process I would like to increase number of cpus allocated in case of error 140 and 143 and to just retries for 10 times for all the other kind of errors. I tried the two following sintaxes but both didn't work
process {
    withName: structural_alignment {
        if (task.exitStatus in 140..143 )
            """
            errorStrategy = 'retry'
            cpus   = {2 * task.attempt}
                maxRetries = 5
            """
        else 
            errorStrategy = 'retry'
                maxRetries = 10
    }       
}
process {
 withName: structural_alignment {
        if (task.exitStatus in 140..143 ) {
            errorStrategy = 'retry'
            cpus   = {2 * task.attempt}
                maxRetries = 5
        }
        else {
            errorStrategy = 'retry'
                maxRetries = 10
        }
    }
gianmore
@gianmore
Also how can I specify only error 140 and 143 and not all the other in the middle? I tried to separate them with a comma, but it didn't work
gpalou4
@gpalou4

Hi guys.
I have a simple doubt (I think). I just need to save my output process in an external directory so I'm using the publishDir function for it. However I need 2 things: i) use variables (collected from input tuple); ii) Create the directory because it doesn't exist.
I successfully run it like this:

    publishDir "${params.out_dir}/${tcga_project}/${tcga_barcode}/RSEM_quantification", mode: 'move'

    input:
    file STAR_bam_file from STAR_alignment_bam
    set val(sample_UUID), val(tcga_barcode), val(tcga_project) from samples_ch_3

But It doesn't create the directory. So I tried switching to this:

    outDir = file("${params.out_dir}/${tcga_project}/${tcga_barcode}/RSEM_quantification")
    outDir.mkdirs()
    publishDir outDir, mode: 'move'

    input:
    file STAR_bam_file from STAR_alignment_bam
    set val(sample_UUID), val(tcga_barcode), val(tcga_project) from samples_ch_3

However it states the error of:
No such variable: tcga_project

Any help in this situtation? Thanks :)

2 replies
hukai916
@hukai916
Hi all,
If exit 1, "ERROR MSG" is from a sub-workflow, the message will not be printed out to console, though it is inside .nextflow.log. I must use NXF_ANSI_LOG=false nextflow run main.nf to force the exit message to console.
Can anyone let me know why and how to solve it?
Regards,
nickhsmith
@nickhsmith
Hi all! I am trying to find how to set a profile in a config file. For example, I'm using a nf-core package, and am sick of running -profile docker at the command line level, and instead I would like to have in my nextflow.config file profile = docker such that it successfully imports all of the config options specified by the docker profile. thanks
3 replies
Brandon Cazander
@brandoncazander
I'm using collectFile in my workflow to combine the results of several upstream processes, and setting storeDir. However, when I resume my workflow (using AWS Batch executor), even though the upstream processes are correctly cached, the downstream process that consumes the output of collectFile always re-executes. I've tried sorting the input to collectFile with no luck.
4 replies
9d0cd7d2
@9d0cd7d2:matrix.org
[m]
Do you think if it's possible to decouple the executor destination from the user pipeline? My purpose is to have "one architecture pipeline" deciding the executor based on different metrics for each step of another pipeline ("user workflow"). I'm thinking on generate dynamically the user pipeline file, but I don't know if is possible to achieve this as a built-in functionality on the tool. Thanks in advance.
3 replies
xmzhuo
@xmzhuo
How to use docker from a private repo (user and password needed), can not find this in Scope docker:
 docker {
    enabled = true
}
process {
   withName:toy {
        container = 'user.abc.io/test/example'
   }
}
7 replies
Young
@erinyoung

How come

Channel
  .fromFilePairs( "${params.reads}/*{1,2}*.fastq.gz", size: 2 )
  .into { paired_reads }

does not work when the file starts with a number (like 7126-MS-1_100_S1_L005_R1_001.fastq.gz and 7126-MS-1_100_S1_L005_R2_001.fastq.gz or 21VR067049-211104_S1_L001_R1_001.fastq.gz and
21VR067049-211104_S1_L001_R2_001.fastq.gz

8 replies
Moritz E. Beber
@Midnighter
What is the recommended way to write a CSV file from nextflow? I can't seem to import the CSVPrinter https://commons.apache.org/proper/commons-csv/apidocs/org/apache/commons/csv/CSVPrinter.html
David Mas-Ponte
@davidmasp
Hello all, I am using .collate() in my pipeline and then an implementation of this which works elegantly. My problem is with the -resume option. Some processes get cached, but the rest are re-scheduled. I am assuming the order changes from run to run before the collate operator, and thus assumes input has changed. Could this be it?
Also, what is the “canonical” way of sorting a channel? Maybe this?
Channel.from(2,1,3,4).toSortedList().fromList()
Brandon Cazander
@brandoncazander
When running with the AWS Batch executor, is it the main nextflow process that publishes files (using publishDir directive, or do the individual processes do this themselves?
5 replies
chittablog
@kumarusa2020

Hello Group members, I am trying a sample nextflow script using Azure Blob storage for work directory. I am getting an error and couldn't understand if my setup has anything to do, appreciate your response. Here is the error when trying to run my sample script connecting to Azure Blob storage

nextflow run tutorial.nf -w az://nextflow-work/work

image.png
3 replies
xmzhuo
@xmzhuo

How to deal with the empty path channel in process (dsl2)? I saw a solution for empty channel of value (https://github.com/nextflow-io/patterns/blob/master/docs/process-when-empty.adoc)

nextflow.enable.dsl=2
params.a = '*.txt'
params.b = ''
params.c = ''

process test {
   tag "test "
   echo true

   input:
   path file1
   path file2
   val  value1

   """
   echo $file1
   echo $file2
   echo $value1
   """

}

workflow {
    a_ch = Channel.fromPath(params.a)
    b_ch = Channel.fromPath(params.b)
    test(a_ch,b_ch,params.c)
}

The Error message:

N E X T F L O W  ~  version 21.04.3
Launching `code/test2.nf` [modest_colden] - revision: b4078eef6a
Missing `fromPath` parameter
rpetit3
@rpetit3:matrix.org
[m]
could try a_ch = params.a ? Channel.fromPath(params.a) : [] maybe?
1 reply
yedidya-be
@yedidya-be:matrix.org
[m]

Hi,

I'm trying to use Docker in Nextflow script and I'm getting the following error:

"connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Fr
un%2Fdocker.sock/v1.24/containers/create?name=nxf-8IoBF1Fj7HBmfAtOGRGpW5Fp": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'."

Does anyone have any advice on how to handle this?

yedidya-be
@yedidya-be:matrix.org
[m]

:point_up: Edit: Hi,

I'm trying to use Docker in Nextflow script and I'm getting the following error:

"connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Fr
un%2Fdocker.sock/v1.24/containers/create?name=nxf-8IoBF1Fj7HBmfAtOGRGpW5Fp": dial unix /var/run/docker.sock: connect: permission denied.
 See 'docker run --help'."

Does anyone have any advice on how to handle this?

2 replies
Alan Hoyle
@alanhoyle
In a profile in the Nextflow config, it sets process.errorStrategy = 'finish'. Can someone remind me how to override that at the command line? I want to set it to 'retry' (and I assume I can do something similar to set maxTries = 4)
1 reply
Nicolas Mendoza
@nmendozam

Hello,

I am trying to run nextflow inside a docker and from there: run other dockers in the host machine. For that I have built a docker image with nextflow and docker inside, as so:

FROM nextflow/nextflow

# Adds ability to run docker in the host
RUN amazon-linux-extras install docker -y

WORKDIR /nextflow

But when running the below line, it says Command error: /bin/bash: .command.sh: No such file or directory

docker run -v /var/run/docker.sock:/var/run/docker.sock custom/nextflow bash -c 'nextflow run hello -with-docker nextflow/examples'

Does anyone have an idea on how to fix this?

Richard Corbett
@RichardCorbett
Hi all, is there a way to "flush" the publish command? I understand it is asynchronous by default, but I have a pipeline that runs for 7-10 days and some of the useful results are complete after the first day. Would be good if I could request the results from day 1 are "published" soon after completion.
saphir746
@saphir746
Hello Everyone. Running NF as part of a custom made script, wrapping around MatLaB commands. I have a problem where some of my sub-processes fail, but I can't workout why: Caused by:
Process init_Config (3) terminated for an unknown reason -- Likely it has been terminated by the
external system
Looking at the log files of the other 'init_Config' processes, nothing differentiates them. No error flags around wall-time or ressource usage. How do you trouble-shoot that?
Scott Yourstone
@islandhopper81

Hello everyone,

Is it possible to update process information using withLabel on the command line? So something like:

nextflow run hello_world.nf -process.withLabel:hello_world.cpus 2

I know that something as simple as this works:

nextflow run hello_world.nf -process.cpus 2

but I want to target a particular process.

Håkon Kaspersen
@hkaspersen

hello everyone, I am using singularity images from biocontainers for most of my processes, where they are pre-downloaded and used directly (as the cluster nodes don't have internet access). However, I am having issues with the Prokka image from that site. I pull the images from biocontainers with singularity pull, and use that image directly in the nextflow pipeline. However, it seems that nextflow doesn't want to use the prokka image directly, it rather wants to download it from docker. Note that it works fine for all other processes that have been downloaded the same way. Does anyone know anything about this image? https://biocontainers.pro/tools/prokka
(Note: I have tried several versions of the singularity image, all give the same result).
My nextflow.config:

params.container_dir    = 'path/to/images'

singularity {
        enabled         = true
        autoMounts      = true
}

The container is called like this in the prokka process:

process PROKKA {
        container "${container_dir}/prokka:1.14.5--pl526_1"

Thanks in advance!

mbahin
@mbahin
Hi, I have a (stupid?) question :). What is the synthax for comments in the script block?
2 replies
Tj-Idowu
@Tj-Idowu

Hello,

I am trying to figure out how to separate and categorize some files based on some string values in their name. For example, if the files are named;
X_filename_f0_r1-1_1_R1.fastq
X_filename_f0_r0-1_1_R1.fastq
X_filename_f0_r0-1_2_R1.fastq
X_filename_f0_r1-0_3_R1.fastq

X_filename_f1_r1-1_1_R1.fastq
X_filename_f1_r0-1_1_R1.fastq
X_filename_f1_r0-1_2_R1.fastq
X_filename_f1_r1-0_3_R1.fastq

X_filename_f2_r1-1_1_R1.fastq
X_filename_f2_r0-1_1_R1.fastq
X_filename_f2_r0-1_2_R1.fastq
X_filename_f2_r1-0_3_R1.fastq

X_filename_f3_r1-1_1_R1.fastq
X_filename_f3_r0-1_1_R1.fastq
X_filename_f3_r0-1_2_R1.fastq
X_filename_f3_r1-0_3_R1.fastq

How can I separate the files based on f0, f1, f2, f3 and have each category saved under a different name? Then I want to separate the same files based on the numbers after the "r" but before the underscore. There are a lot of different numbers so I can't be specific in the script about the numbers to select. These same files will then be separated again based on the number before "_R1". So in the end, I will have a category of files based on f-number then a subcategory based on r number then another subcategory under that based on a number.

Thanks
Tj

Pablo Riesgo-Ferreiro
@priesgo
hi all,
I have searched for error handling in Nextflow docs without success. Can someone point me in the right direction?
I just want to do some sanity checks on the inputs of a process and raise a controlled error if certain error conditions are met.
Thanks!