pepkit / pepspec

Documentation for PEP specification and all PEPkit software
https://pep.databio.org/
10 stars 4 forks source link

confusing section of the project config file specification #17

Closed hreypar closed 3 years ago

hreypar commented 3 years ago

Hi, I was studying the PEP documentation because I want to use it for a project and I was wondering if it wouldn't be better to remove other_attr from the attributes part of the derive sample modifier because there is no key3 so it's confusing.

sample_modifiers:
    derive:
        attributes: [read1, read2, other_attr]
        sources: 
            key1: "path/to/derived/value/{attribute1}"
            key2: "path/to/derived/value/{attr2}"

Maybe I'm understanding the derive sample modifier wrong, so if the example config file is correct, I'd appreciate it if you could explain it to me. Thanks!

nsheff commented 3 years ago

The attributes and sources aren't one-to-one... you can have as many attributes as you want, and you can use the keys interchangeably.

So it was kind of intended to show exactly this situation. So, you can do this if you want:

read1 read2 other_attr
key1 key1 key1
hreypar commented 3 years ago

I still need to think about an example to grasp the modifier properly, but your clarification was great. Thank you!! And I'm really enjoying the PEP concept, I think it's the standardization dream made as simple as possible Cheers!