pachterlab / seqspec

machine-readable file format for genomic library sequence and structure
MIT License
109 stars 17 forks source link

seqspec split error #48

Closed RaiRuhi closed 1 month ago

RaiRuhi commented 1 month ago

seqspec split -o split spec.yaml

Traceback (most recent call last): File "/software/miniconda3/bin/seqspec", line 8, in sys.exit(main()) File "/software/miniconda3/lib/python3.9/site-packages/seqspec/main.py", line 82, in main COMMAND_TO_FUNCTION[sys.argv[1]](parser, args) File "/software/miniconda3/lib/python3.9/site-packages/seqspec/seqspec_split.py", line 35, in validate_split_args spec.sequencer, AttributeError: 'Assay' object has no attribute 'sequencer'

_I commented out the spec.assay in seqspecsplit.py and now I am getting

Traceback (most recent call last): File "/software/miniconda3/bin/seqspec", line 8, in sys.exit(main()) File "/software/miniconda3/lib/python3.9/site-packages/seqspec/main.py", line 82, in main COMMAND_TO_FUNCTION[sys.argv[1]](parser, args) File "/software/miniconda3/lib/python3.9/site-packages/seqspec/seqspec_split.py", line 33, in validate_split_args spec_m = Assay( TypeError: init() missing 5 required positional arguments: 'sequence_kit', 'library_protocol', 'library_kit', 'sequence_spec', and 'library_spec'

sbooeshaghi commented 1 month ago

The error was arising from not having updated the Assay initialization with the enhanced version of the seqspec for each "split". I have corrected this and have pushed the corrected code to the repo. seqspec split should now work as expected. You can try it out with the dogmaseq-dig spec located in examples/specs/dogmaseq-dig/spec.yaml

$ seqspec split -o split spec.yaml
$ ls -1
spec.yaml
split.atac.yaml
split.protein.yaml
split.rna.yaml
split.tag.yaml