Skip to content

Bug: @remove directive not parsed correctly in config file #33

@bentyeh

Description

@bentyeh

Since its introduction in version 0.29.4 (and through the current version 0.31.2), the @remove directive in the config file has not been parsed correctly, even though instructing splitcode to perform the same remove operation via the -r/--remove command line argument works correctly.

Minimum working example

  • input.fastq
    @read1
    AAA
    +
    ;;;
    
  • config.txt
    id	tag
    tag1	AAA
    
  • config_with_remove.txt
    @remove:
    tag1
    
    id	tag
    tag1	AAA
    

The command

splitcode -c config.txt --mod-names --out-fasta --nFastqs=1 -o /dev/stdout input.fastq

correctly identifies tag1

>read1::[tag1]
AAA

and adding a remove directive via the command line works as expected:

splitcode -c config.txt --mod-names --remove=<(echo "tag1") --out-fasta --nFastqs=1 -o /dev/stdout input.fastq

generates empty output. However,

splitcode -c config_with_remove.txt --mod-names --remove=<(echo "tag1") --out-fasta --nFastqs=1 -o /dev/stdout input.fastq

produces a standard output of

>read1::[tag1]
AAA

and a standard error of

Name "tag1 " does not exist
* Using a list of 1 tags (vector size: 1; map size: 1; num elements in map: 1)
* will process sample 1: input.fastq
* processing the reads ...
done 
* processed 1 reads

See also https://colab.research.google.com/drive/1NGGEudqUrxdYBtgyeBS0APOVzIo84kcX for an executable example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions