TeselaGen / tg-oss

Teselagen Open Source modules
https://teselagen.github.io/tg-oss/
MIT License
39 stars 19 forks source link

fix detection of reverse features #7

Closed MarcelBolten closed 1 year ago

MarcelBolten commented 1 year ago

Hi @tnrich, I think I could solve the issue with the .dna parser (https://github.com/TeselaGen/openVectorEditor/issues/901) Please give some advice on details for the implementation if the way I did it does not comply with your expectations. Also, I found a resource with some information regarding the snapgene file format internals. Please see https://incenp.org/dvlpt/docs/binary-sequence-formats/binary-sequence-formats.pdf

I had/have trouble running the repo nx, vitest, ... stuff. It does not work out of the box for me after following the instructions in the repo readme (https://github.com/TeselaGen/tg-oss/blob/main/README.md).

> nx run bio-parsers:test

Usage Error: Couldn't find a script named "vitest".
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
Warning: run-commands command "cd packages/bio-parsers && yarn vitest run --changed --config vite.config.ts" exited with non-zero status code

 ———————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target test for project bio-parsers (1s)

    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]

Anyways, I did run cd packages/bio-parsers && ./../../node_modules/.bin/vitest and tests were successfully executed.

tnrich commented 1 year ago

@MarcelBolten awesome thanks for looking into this! I'll provide better setup instructions/troubleshoot the setup later today and get back to you

tnrich commented 1 year ago

Hi @MarcelBolten, did you remember to run yarn at the top level of the repository? That should install vitest and any other dependencies needed to run commands.

Let me know if it still isn't working for you!

MarcelBolten commented 1 year ago

Yes, I did run yarn and it installed all dependencies. Seems like yarn does not find vitest if I get the error message right. Maybe only a problem on my system. Don't worry about it. I can run the tests and yarn exec nx run bio-parsers:lint works.

MarcelBolten commented 1 year ago

maybe there is an exec missing in the commands in file project.json: ...yarn vitest... should be yarn exec vitest

tnrich commented 1 year ago

Interesting @MarcelBolten I've never experienced the issue you're seeing. Yarn has always been able to run binaries installed as node_modules.

I'd actually never even known that the yarn exec command existed 🤷

Glad you got it to work. If other people experience the same issue you're seeing then I'll update the command to use yarn exec

tnrich commented 1 year ago

Also a head up that I published updated packages for ya :)

Lemme know if you have any issues

MarcelBolten commented 1 year ago

Thank you very much. I will test it later.

tnrich commented 1 year ago

@MarcelBolten do you think you could attach a linear .dna sequence file here? I don't have snapgene on my computer. Also if you happened to have a .geneious sequence file that is linear as well I would love that. Thanks very much!

MarcelBolten commented 1 year ago

Actually I don't have snapgene either. I get the files from addgene. A liner fragment can be found in the following link https://www.addgene.org/browse/sequence/91117/ (https://media.addgene.org/snapgene-media/v1.7.9-0-g88a3305/sequences/91117/41cfae39-8bc5-403f-b292-6ed7c7cfa5e7/addgene-plasmid-50004-sequence-91117.dna)

I never came across a .geneious file in my life so far, sorry.