Hi Sarah,
Thanks for your interest in using polyfreqs! I'll do my best to answer your questions below but please feel free to let me know if anything is unclear.
1) polyfreqs should be able to handle SNP data that are collected from any pipeline because it uses the read counts (total number of reads and number of reference reads mapping to a SNP locus) and not the genotype calls that any particular pipeline will give you. These read counts can be specified in separate, tab-delimited text files that are then read into R. Since you are using Stacks, you will need to get the total number of sequencing reads that map to each SNP that it identifies, as well as the number of reads for the reference allele (I'm guessing the program usually chooses this, which is fine) for each individual that you have sampled. To make this easier, I think that Stacks can output its SNP calls in VCF format, which should have those numbers embedded within the output VCF file (the AD field within the genotype section has the "allele depths" that you will want). Once you have the total read counts and reference read counts for each individual at each locus, you can read them into R, convert them to matrices (using `as.matrix()`), and then pass them as arguments to the `polyfreqs()` function.
2) Lindsay Clark has a Python program called TagDigger (
https://github.com/lvclark/tagdigger) that looks like it could be good for getting the read counts that polyfreqs uses, too. Otherwise, it will likely take a bit of scripting to extract the read counts from the VCF file Stacks gives you.
3) This is a really good question that I unfortunately do not know the answer to because I have not explored it yet. I'm working on some models for allopolyploids right now and have thought about ways of determining if something is an auto- or allopolyploid but these ideas are not really far enough along to be useful to you at the moment. However, I'd be happy to share them with you once they are more fully developed.
4) The outputs of polyfreqs are the posterior samples of the allele frequencies, and the observed and expected heterozygosity at each locus. If you set `genotypes=TRUE` when you run the program, it will also give you a matrix of genotype calls for each individual at each locus. This genotype matrix can then be saved as a tab-delimited text file (using the `write.table()` function in R). I believe fastStructure can take data that are in the original Structure format, so it should be fairly easy to take this genotypes files from polyfreqs and format it for fastStructure. I don't currently have a function for doing this automatically, though.
--------
Hopefully that helps! If you have any other questions please don't hesitate to ask.
Best,
Paul