snijderlab / stitch

Template-based assembly of proteomics short reads for de novo antibody sequencing and repertoire profiling
MIT License
22 stars 3 forks source link

Implement batchfile extension with other documents #209

Closed douweschulte closed 1 year ago

douweschulte commented 1 year ago

To allow for easier reuse of repeated elements between batchfiles it could be beneficial to allow for in place loading of other files. This would open the file and expand everything inside to the exact location of the load statement. See below for the suggested syntax, this makes it easy to parse and is somewhat similar to related syntax in other projects. Care should be given so that the error give the correct location and file for loaded files and that the HTML batchfile contains a fully expanded view so that it can very easily be rerun with exactly the same parameters even if the shard files have moved or changed in the meantime.

TemplateMatching ->
    ...
    @load alphabets/mass_based_alphabet.txt
    @load templates/homo_sapiens_germlines.txt
<-

This will close: #111 but as seen above will be more generally useful.

douweschulte commented 1 year ago

It is now done with the following syntax, it can only be used to inline a normal Argument on a place where this would be valid.

TemplateMatching ->
    ...
    include!(../alphabets/mass_based_alphabet.txt)
    include!(../templates/homo_sapiens_germlines.txt)
<-