Giter Site home page Giter Site logo

Comments (8)

NatJWalker-Hale avatar NatJWalker-Hale commented on August 11, 2024

Having a peek, I think (though could be wrong), that this is because there is no check for -r while checking for the mismatch of lengths. I guess that will have to check if they're off by one if -r is invoked. I'll try fiddle with it my end and submit a PR if it works, unless you get to it first.

from phyx.

josephwb avatar josephwb commented on August 11, 2024

Can confirm. Sorry about that. I will have a look later today. It should take a few minutes, but I am heading out the door.

from phyx.

josephwb avatar josephwb commented on August 11, 2024

Ok I see what is going on. Be back soon.

from phyx.

josephwb avatar josephwb commented on August 11, 2024

Should be fixed with 9f15c7a

from phyx.

josephwb avatar josephwb commented on August 11, 2024

Sorry I missed your PR. I think mine works well (will put in a few tests). Yours looks fine if you can assume all files are what they say they are (nuc and associated pep). If you've somehow mixed up files, your fix will allow the program to proceed (i.e., counts are explicitly set to be equal), but would crash if the lengths are not what they should be (say, a nuc alignment shorter than the peptide on). Just thinking of ways people can break things (>ᴗ•)

from phyx.

NatJWalker-Hale avatar NatJWalker-Hale commented on August 11, 2024

That works! Although I note that it makes the codon count in the error message for mismatching lengths off by one, e.g.

test2.cds.fa.txt

pxaa2cdn -r -a test.pep.fa.txt -n test2.cds.fa.txt
Error: for taxon '1' nucleotide alignment involves 4 codons, but protein alignment involves 2 amino acids. Skipping.
Error: for taxon '2' nucleotide alignment involves 4 codons, but protein alignment involves 2 amino acids. Skipping.

But test2.cds.fa.txt has 5 codons, etc...

Anyway, I see what you mean about my PR, will close it! Many thanks for dealing with it so quickly.

from phyx.

josephwb avatar josephwb commented on August 11, 2024

Erg yes I'll fix the warning.

from phyx.

NatJWalker-Hale avatar NatJWalker-Hale commented on August 11, 2024

legend, thanks!

from phyx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.