depth.py now parses command line arguments and can accept an optional argument specifying a file which in turn specifies a subset of paths in the graph. Node depth will only be computed with respect to these paths; other paths will not be incuded in the tally.
Add a few very simple test cases for testing node depth over a subset of paths
Set up testing functionality for node depth over a subset of paths. I added a subdirectory in test called subset-paths which contains .paths files. Each .path file specifies a subset of paths for some .og file. Additionally, for each {base}.paths file there is a {base}.txt file which specifies the .og file which {base}.paths corresponds to. For example, there is a file called ex1.paths, so there is a correspond file ex1.txt which simply contains the line ARGS: ../basic/ex1.og, specifying that ex1.paths lists a subset of the paths in ../basic/ex1.og. (I cannot put comments in the .paths files because of how odgi parses them. :( )
Wrangle with the Makefile and try to keep it updated and clean
This approach to testing, while requiring these .txt files, allows us to keep all of the .paths files in the same directory even though the .gfa files may be in different directories, and it allows us to generate multiple .paths files for the same .og files without duplicating the .og files and placing them in separate directories.
The Makefile is a bit... messy. The target make og is especially difficult for the human eye to parse. If you have time and feel like messing with Makefiles, I would especially appreciate if you could take a look and let me know how this could be done better!
This PR does a couple of things:
test
calledsubset-paths
which contains.paths
files. Each.path
file specifies a subset of paths for some.og
file. Additionally, for each{base}.paths
file there is a{base}.txt
file which specifies the.og
file which{base}.paths
corresponds to. For example, there is a file calledex1.paths
, so there is a correspond fileex1.txt
which simply contains the lineARGS: ../basic/ex1.og
, specifying thatex1.paths
lists a subset of the paths in../basic/ex1.og
. (I cannot put comments in the.paths
files because of how odgi parses them. :( )This approach to testing, while requiring these
.txt
files, allows us to keep all of the.paths
files in the same directory even though the.gfa
files may be in different directories, and it allows us to generate multiple.paths
files for the same.og
files without duplicating the.og
files and placing them in separate directories.The Makefile is a bit... messy. The target
make og
is especially difficult for the human eye to parse. If you have time and feel like messing with Makefiles, I would especially appreciate if you could take a look and let me know how this could be done better!