dereneaton / ipyrad

Interactive assembly and analysis of RAD-seq data sets
http://ipyrad.readthedocs.io
GNU General Public License v3.0
72 stars 40 forks source link

Cosmetic issue in .alleles file #387

Closed edgardomortiz closed 4 years ago

edgardomortiz commented 4 years ago

The line with the * and - indicating informative or uninformative variable sites needs two more spaces to account for the addition of _0 and _1 to the sample names:

C_06_0         CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATATTGCAC
C_06_1         CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATATTGCAC
C_23_0         CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCACAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATACTGCAC
C_23_1         CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCACAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATACTGCAC
Pap_51_0       CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATACTGCAC
Pap_51_1       CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATACTGCAC
Pe_1703_0      CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATATTGCAC
Pe_1703_1      CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATATTGCAC
Pe_1705_0      CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATACTGCAC
Pe_1705_1      CAGCTGAAGGAAAAGACGTGTACAAAAAGTGTTTAGGATGCTTCATAGAACTTCCTCTTGCCTCCATCATTAATGGTAACGTTTATACTGCAC
//                                                        -                                         *     |38|
edgardomortiz commented 4 years ago

The previous one was done de novo, with a reference analysis the line hax +2 spaces:

C_23_0          GCACCAACAGAATGGCCATGTGGAAAATTGTTGGTCGGTAATCGCAC
C_23_1          GCACCAACAGAATGGCCATGTGGAAAATTGTTGGTCGGTAATCGCAC
C_72_0          GCACCAACAGAATGGCCATGTGGAAAATTGTTGGTCGGTAATCGCAC
C_72_1          GCACCAACAGAATGGCCATGTGGAAAATTGTTGGTCGGTAATCGCGC
Paa_1946_0      GCACCAACAGAATGGCCATGTGGAAAATTGTTGGTCGGTAATCGCAC
Paa_1946_1      GCACCAACAGAATGGCCATGTGGAAAATTGTTGGTCGGTAATCGCGC
//                                                             * |7:PeexChr1:54055-54102|
edgardomortiz commented 4 years ago

Dear Isaac, I think this issue is more than cosmetic, it is at least messing up my script to convert the .alleles file for fineRAD (https://github.com/edgardomortiz/fineRADstructure-tools). I think I may have located the errors:

First here: https://github.com/dereneaton/ipyrad/blob/28143f220f88455c7689bec6f8a60d3553c8687a/ipyrad/assemble/write_outputs.py#L1706 Change for 2 fewer spaces in "// ":

                    asnpstring = "//  " + snpstring[2:]

And then here: https://github.com/dereneaton/ipyrad/blob/28143f220f88455c7689bec6f8a60d3553c8687a/ipyrad/assemble/write_outputs.py#L1721-L1722 Change to:

                        achunk.append(
                            "{}|{}|\n".format(asnpstring, idx))

I think these editions may fix the issues but I haven't tested yet.

Edgardo

isaacovercast commented 4 years ago

Thanks Edgardo, I actually meant to work on this today, but you saved me a ton of time by narrowing it down. Much appreesh. Fixed in 2563125. Will push a new version to bioconda. Thanks again!