EricArcher / strataG

strataG is a toolkit for haploid sequence and multilocus genetic data summaries, and analyses of population structure.
25 stars 11 forks source link

Issue: Cannot execute arp2gtypes on Arlequin input file #34

Closed Selachophile closed 3 years ago

Selachophile commented 4 years ago

Hello,

I hadn't seen this anywhere else, so please excuse me if this has been asked before. I have an Arlequin input file that I'd like to import into strataG (DataType=FREQUENCY), but when I try to execute arp2gtypes, I get the following error:

Error in '$<-.data.frame'('*tmp*', "id", value = c("_1", "_0")) : 
  replacement has 2 rows, data has 0

Here is the first section of my input file:

[Profile]
    Title="HFCR2"
    NbSamples=5
    DataType=FREQUENCY
    GenotypicData=0
    LocusSeparator=NONE

[Data]
[[Samples]]
    SampleName="Catalina"
    SampleSize=29
    SampleData={
        C-F4    17
        C-F8    5
        C-F13   5
        C-F17   1
        C-F53   1
        M-F65   0
        M-F68   0
        PV-F154 0
    }
    SampleName="Malibu"
    SampleSize=28
    SampleData={
        C-F4    7
        C-F8    3
        C-F13   8
        C-F17   6
        C-F53   0
        M-F65   2
        M-F68   2
        PV-F154 0
    }
    SampleName="PV"
    SampleSize=30
    SampleData={
        C-F4    6
        C-F8    1
        C-F13   10
        C-F17   6
        C-F53   0
        M-F65   2
        M-F68   3
        PV-F154 2

Each identifier (e.g., C-F4) is a unique haplotype. I'm sure I'm missing something obvious. The only time I've gotten the function to work is with DataType=DNA, where ID and the sequence for each individual is listed once. The problem is, when I do that, strataG thinks that each haplotype is unique, and Fst ends up being calculated as zero (which I know isn't the case).

Any tips or advice would be much appreciated.

Cheers, Sean

EDIT: Yikes, sorry about the formatting. I'll work on fixing that...aaaaand fixed!

EricArcher commented 4 years ago

What version of strataG are you using? I did a large overhaul of the arlequin parsing code in the latest version (2.4.9x). If you are using this version, would you send me the full .arp file and I'll see where the problem is.

Selachophile commented 4 years ago

Hi Eric!

I'm using v2.4.905. I'll send that file your way. Thanks so much!

Cheers, Sean

Edit: I've attached it here as a .txt file; seems easier that way. Sample_Het_Arl_FREQ.txt