Search code examples
nextflow

Change width of Nextflow output text


Is there a way to increase the width of the nextflow stdout? I have looked through the documentation, but I can't see anything. I realise this might be a parameter of the bash environment instead, but also couldn't find a way to change this.

In this instance, there is some information missing from tag{ sampleID+"-"+MapperVal } in all the Mapping jobs.

executor >  local (1), pbspro (9)
[e0/c2b561] process > GFF_Check (1)                  [100%] 1 of 1 ✔
[fe/0aa2b0] process > Mapping (Merged_Barcode09-m... [  0%] 0 of 9
[-        ] process > FormatBams                     -
[-        ] process > IsoQuant                       -
[-        ] process > ESPRESSO_S                     -

Solution

  • Using a modified version of helloWorld as an example, where I have made the tag extremely long:

    #!/usr/bin/env nextflow
    nextflow.enable.dsl=2
    
    process sayHelloWithQuiteALongName {
      input:
        val x
      tag "$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x$x"
      output:
        stdout
      script:
        """
        echo '$x world!'
        """
    }
    
    workflow {
      Channel.of('Bonjour', 'Ciao', 'Hello', 'Hola') | sayHelloWithQuiteALongName | view
    }
    

    Regular parameters trims the line when it gets too long:

    nextflow run hw/main.nf

    nextflow run hw/main.nf -ansi-log true
    N E X T F L O W  ~  version 21.10.6
    Launching `hw/main.nf` [deadly_pasteur] - revision: af5625b97b
    executor >  local (4)
    [80/c3d0ae] process > sayHelloWithQuiteALongName (BonjourBonjourBonjourBonjourBo... [100%] 4 of 4 ✔
    Hola world!
    
    Hello world!
    
    Ciao world!
    
    Bonjour world!
    

    Turning off ansi logging: nextflow run hw/main.nf -ansi-log false

    N E X T F L O W  ~  version 21.10.6
    Launching `hw/main.nf` [big_agnesi] - revision: af5625b97b
    [e7/acaa39] Submitted process > sayHelloWithQuiteALongName (BonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjourBonjour)
    [f7/33263c] Submitted process > sayHelloWithQuiteALongName (CiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiaoCiao)
    [c9/4f9251] Submitted process > sayHelloWithQuiteALongName (HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello)
    [05/eeff7a] Submitted process > sayHelloWithQuiteALongName (HolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHolaHola)
    Bonjour world!
    
    Ciao world!
    
    Hello world!
    
    Hola world!
    

    A downside is that you don't have each job concatenated into a single line.