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

Logic of keepHeader option of splitText is reversed. #5732

Open
mahesh-panchal opened this issue Jan 31, 2025 · 0 comments
Open

Logic of keepHeader option of splitText is reversed. #5732

mahesh-panchal opened this issue Jan 31, 2025 · 0 comments

Comments

@mahesh-panchal
Copy link
Contributor

Bug report

When you use splitText on a file with the keepHeader option, it does the opposite of what it's supposed to do.

Expected behavior and actual behavior

keepHeader: true removes the header, and keepHeader:false keeps the header.
The expected behaviour is that it's the other way around.

Steps to reproduce the problem

workflow {
    ch_in = Channel.fromPath('data/*tsv', checkIfExists: true)
    .map { it.splitText( keepHeader: false ).join('') }
    .view()
}

sample_A_1.tsv:

workflow {
    ch_in = Channel.fromPath('data/*tsv', checkIfExists: true)
    .map { it.splitText( keepHeader: false ).join('') }
    .view()
}

Program output

 $ nextflow run main.nf 

 N E X T F L O W   ~  version 24.10.4

Launching `main.nf` [sharp_gates] DSL2 - revision: 54c05059bf

Col1    Col2
sampleA1  tagA
sampleA1  tagB
sampleA1  tagC

Environment

  • Nextflow version: 24.10.4
  • Java version: openjdk 17.0.14-internal 2025-01-21
  • Operating system: Linux
  • Bash version: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants