I have been calling SNPs using ANGSD and recently I have been getting problems with the tped output file.
A few random lines in the tped file were corrupted causing plink to be unable to read it and terminate. Yet if I run the exact same ANGSD code I had used previously when I have gotten this corrupted file, it produced a perfect tped file. This had occurred multiple times and I am wondering if others had observed this issue or know any tricks to solve it?
I think I had the same problem. I used ANGSD v 0.923 to generate tped and tfam files and then I tried to run PLINK v1.90 with either one or the other (I paste the script inherent to the first case).
(base) [wildlife_genome@h20 ~]$ plink --file /home/wildlife_genome/anaconda3/pkgs/angsd-0.923-h3ef6ad9_0/bin/RISULATIANGSD1.tped \
--allow-no-sex --allow-extra-chr --indep-pairwise 25 10 0.5 --make-bed --out /home/wildlife_genome/Desktop/PLINK
PLINK v1.90b4 64-bit (20 Mar 2017) www.cog-genomics.org/plink/1.9/
(C) 2005-2017 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to /home/wildlife_genome/Desktop/PLINK.log.
Options in effect:
--allow-extra-chr
--allow-no-sex
--file /home/wildlife_genome/anaconda3/pkgs/angsd-0.923-h3ef6ad9_0/bin/RISULATIANGSD1.tped
--indep-pairwise 25 10 0.5
--make-bed
--out /home/wildlife_genome/Desktop/PLINK
64302 MB RAM detected; reserving 32151 MB for main workspace.
Error: Failed to open
As you can see I got this error. Is this happening to you too?
Can I ask you wath do yu mean with "A few random lines in the tped file were corrupted causing PLINK to be unable to read it and terminate"? I opened both files with a text editor and they should be OK.
By the way, yesterday some colleagues told me that they rather generate the vcf file with ANGSD (http://www.popgen.dk/angsd/index.php/Vcf) and then convert the vfc file to plink format by editing the header line of the vcf file generated by ANGSD prior to using it with vcf tools. Basically they remove the following information from the first line of the vcf file "(ansgd)". You can use nano program in command line to do the same. After this the file should be readable by vcftools. I am trying this option at the moment but for this I have to redo ANGSD from scratch. I hope this can help you too.
.tped + .tfam filesets are loaded with --tfile, not --file.
When using --tfile, don't include the ".tped" extension in the function argument. Also, if you don't have a .tfam file, you need to create a fake one (or just use plink --vcf instead).
Hi,
I have been trying to generate vcf file using angsd using the following command: angsd -b ../Relate/Relate_output/result/Point_three_relatedness/new_point_three_bam.file_list -dovcf 1 -gl 1 -dopost 1 -domajorminor 1 -domaf 1 but I get the following error:
-> angsd version: 0.930 (htslib: 1.9-362-g9d2163a-dirty) build(Sep 23 2019 13:29:14)
-> No '-out' argument given, output files will be called 'angsdput'
[bammer_main] 100 samples in 100 input files
-> Parsing 100 number of samples
[shared.cpp.changeChr():281] refid:0
Charnge chr:0
Segmentation fault
Were you able to successfully generate the vcf file? If yes then can you please provide the command you used?
Thank you
Hi, I have been trying to generate vcf file using angsd using the following command: angsd -b ../Relate/Relate_output/result/Point_three_relatedness/new_point_three_bam.file_list -dovcf 1 -gl 1 -dopost 1 -domajorminor 1 -domaf 1 but I get the following error: -> angsd version: 0.930 (htslib: 1.9-362-g9d2163a-dirty) build(Sep 23 2019 13:29:14) -> No '-out' argument given, output files will be called 'angsdput' [bammer_main] 100 samples in 100 input files -> Parsing 100 number of samples [shared.cpp.changeChr():281] refid:0 Charnge chr:0 Segmentation fault
Were you able to successfully generate the vcf file? If yes then can you please provide the command you used? Thank you