.snp output format
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 207
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
Dear all,
I want to use the 'smartpca.perl' script to check into the substructure of my data set. For this I transformed my vcf file (outputted by STACKSv2) into a EIGENSTRAT format using this python script https://github.com/mathii/gdc/blob/master/vcf2eigenstrat.py. However, I'm having trouble to run the smartpca analysis because on something in my .snp file.
I do work with corals, and although I have a reference genome it is based on scaffolds (in this case these are my CHROM). In addition, I don't have the info of genetic position (cM) of each of my SNPs, but I have the POS in bp within each of my scaffolds
Following the formating of "SNP.id", "CHROM", "genetic position", "physical position", "Ref.allele" and "Alt. allele", this is how my .snp file looks like
head *.snp
74 1 0.0 11620 G A
233 1 0.0 40083 T A
364 1 0.0 63726 T C
365 1 0.0 63662 A T
366 1 0.0 64298 A G
469 1 0.0 77420 T C
491 1 0.0 80555 G A
571 1 0.0 91906 C A
572 1 0.0 91840 T G
622 1 0.0 99103 A G
tail *.snp
2154374 4471 0.0 489 C T
2155635 4707 0.0 402 C T
2156647 4900 0.0 527 T A
2157209 4999 0.0 816 T A
2157594 5081 0.0 422 G C
2157620 5086 0.0 483 T C
2157946 5145 0.0 47 A G
2159656 5497 0.0 439 T C
2159657 5497 0.0 322 T C
2160546 5680 0.0 494 C T
Could you please advise in this regard?
I know the problem is that .snp file because by mistake I reformated the file in a different way ("CHROM", "position within a locus", "absent genetic position (0)", "SNP.id and" "Ref.allele" and "Alt. allele") and the program was able to run.
Does the information contain in this .snp file is used within the smartpca algorithm? or is it just to reference each snp?
Thanks in advance
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with smartpca.perl and the supplied vcf2eigenstrat.py, then compare the generated .snp columns with the format expected by the smartpca entry point. Done means identifying whether the scaffold, genetic-position, physical-position, and allele fields are accepted and documenting the required format or a reproducible correction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, perl, python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100