Hello! A question about the samtools_faidx module....
# modules
l
Hello! A question about the samtools_faidx module... I see that two channels are needed and one has the output (*.fai). Am I missing somthing?
m
that's it
input are: tuple meta, fasta tuple meta, fai (optional)
plus boolean to generate a sizes file from the fai file
l
so putting [] will be ok?
m
yes
l
Copy code
WARN: Input tuple does not match tuple declaration in process `SAMTOOLS_FAIDX` -- offending value: []
m
try
[[:], []]
l
this look like ascii art
m
the first one is an empty map
but I see what you mean
l
other modules
can deal with []
m
I do check in the tests usually
l
no?
m
for the meta map?
l
for the input
but likely they are not meta map
this 1
m
the process expects a tuple, so a single
[]
won't work
l
maybe just adding this in the docs will be ok
how can I do a pull request of documentation?
m
figuring out the best place for this
l
?
m
yeah, not sure where to put that on the website
l
something like optional, if not needed put [[:], []]
m
I'd say more, if you have a channel put it in, or else, put
[[:], []]
m
These additional meta maps all over the place are getting really annoying. A good deal of the time, they're empty too
m
I agree
I do plan to propose to have just 1 for input and 1 for references in the next maintainers meeting
this 1
👍 1
l
I actually like the concept of meta map for adding metadata, maybe a custom object that extends the channel can be a nice improvement of the language in the future
m
We should probably start using
record
objects but we need to establish some good practices first, particularly with nf-core where we don't want to
record
properties to bloat
m
record
objects?
m
Copy code
record SampleInfo( String name, int taxid, String sciname ) {}

workflow {
    Channel.of( new SampleInfo('test species',721 ,'testus latinicus') )
        .map { sample ->
            new SampleInfo(*:sample.toMap() + [sciname: 'testus germanicus'])
        }
        .view()
}
m
ooh I see
Definitively I would see us going down this road
m
and adding 500 differently named properties
l
Uh
Maybe not
m
That's kind of my point. I'd like this to be contained
but we see how things go with the custom meta fields
l
I would like to know more on this discussion
It is something that I would definitely use if it simplify the code
Less code the better for me