Closed TharinduTS closed 4 years ago
You don't have to load devtools
, hierfstat
and assigner
To use radiator::genomic_converter
Could you sent via email the vcf and strata files?
Hey, Thanks. The VCF is bit too large to be sent via email. I'll send you a link with all the files
Hey Thierry, Thanks a lot for reaching out. Please have a look. All the files are here. https://mcmasteru365-my.sharepoint.com/:f:/g/personal/premacht_mcmaster_ca/Er7eFOUwbLVKrG-QoM_GGQQB1zNly5YD8k4WPE9lP6vOkQ?email=reply%2BANWKKRXNHCFOPNKFK3RYHDN5OAF7JEVBNHHCT5XWYM%40reply.github.com&e=phN7lx
On Sep 17, 2020, at 11:35 PM, Thierry Gosselin notifications@github.com wrote:
Could you sent via email the vcf and strata files?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thierrygosselin/radiator/issues/95#issuecomment-694628633, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWKKRREBELXRL7VWI5JUZTSGLIPJANCNFSM4RRLEYFQ.
Try via my email please thierrygosselin@icloud.com
I'll have a look at it in a few hours
Thanks
On Fri, 18 Sep 2020, 12:06 am Thierry Gosselin, notifications@github.com wrote:
Try via my email please thierrygosselin@icloud.com
I'll have a look at it in a few hours
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thierrygosselin/radiator/issues/95#issuecomment-694637535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWKKRXZMQGGTLYWQ4ZGZL3SGLMD7ANCNFSM4RRLEYFQ .
Dear Tharindu, I'm currently looking at the problem you're encountering. I'm able to reproduce the bug, good thing!
Question: what's the source of your VCF ?
Just a side note, the 2 strata files in the folder: strata_L_and_G.tsv
and strata_L_and_G_3.tsv
have a space character at the beginning of the id. It's taken care of in radiator, but other programs might have problem with this. Be careful.
VCF source : samtools ? via another RADseq pipeline ?
Hey, It was created with samtools using sorted bam files. It did work fine with vcftools and other programmes. But I had to make one change (in case you want to know), I had to remove scaffold contig lines as asked by the radiator because it was making the header too large. But I guess it should not be an issue aa I filtered the vcf with vcftools and kept only the chromosomes
The removed lines were like
On Sep 18, 2020, at 8:44 AM, Thierry Gosselin notifications@github.com wrote:
VCF source : samtools ? via another RADseq pipeline ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thierrygosselin/radiator/issues/95#issuecomment-694845219, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWKKRQLDI3AUH4GVCPMDSDSGNIZJANCNFSM4RRLEYFQ.
I have just updated GitHub, radiator should be able to read your VCF.
The strata: strata_L_and_G.tsv
you provided as 15 strata for 46 individuals and several groups only have 1 sample. I would regroup those samples before using hierfstat.
Test1
test1 <- radiator::read_vcf(
data = "all_samples_varient_chrs_only_header_scaffolds_cleared.vcf",
strata = "strata_L_and_G.tsv",
filter.common.markers = FALSE,
filter.monomorphic = FALSE)
test2
test2 <- radiator::genomic_converter(
data = "all_samples_varient_chrs_only_header_scaffolds_cleared.vcf",
strata = "strata_L_and_G.tsv",
output = "hierfstat"
)
Re-open the issue if you're still experiencing a problem Best, Thierry
Hi Thierry, Thanks for the reply. But it seems like I am getting the same error message. Can you please clarify the following? 1) I just updated assigner using install_github("thierrygosselin/assigner”) and then tried your code 2) Is having more than one sample per population is a must for the radiator to work?
Thanks, Tharindu
On Sep 18, 2020, at 3:49 PM, Thierry Gosselin notifications@github.com wrote:
I have just updated GitHub, radiator should be able to read your VCF.
The strata: strata_L_and_G.tsv you provided as 15 strata for 46 individuals and several groups only have 1 sample. I would regroup those samples before using hierfstat.
Test1
test1 <- radiator::read_vcf( data = "all_samples_varient_chrs_only_header_scaffolds_cleared.vcf", strata = "strata_L_and_G.tsv", filter.common.markers = FALSE, filter.monomorphic = FALSE) test2
test2 <- radiator::genomic_converter( data = "all_samples_varient_chrs_only_header_scaffolds_cleared.vcf", strata = "strata_L_and_G.tsv", output = "hierfstat" ) Re-open the issue if you're still experiencing a problem Best, Thierry
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thierrygosselin/radiator/issues/95#issuecomment-695054392, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWKKRQP3YKAFTNKO4XG3VLSGO2URANCNFSM4RRLEYFQ.
Assigner package as nothing to do with this issue
Please reinstall radiator and re-start R.
Okay. Thanks again.
On Sun, 20 Sep 2020, 2:26 pm Thierry Gosselin, notifications@github.com wrote:
Assigner package as nothing to do with this issue
Please reinstall radiator and re-start R.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thierrygosselin/radiator/issues/95#issuecomment-695819437, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWKKRTOBCFBJQRZ63XPPWLSGZCM3ANCNFSM4RRLEYFQ .
Sorry about the confusion. I have sent you the wrong code
On Sun, 20 Sep 2020, 2:27 pm Tharindu TS, tharindutaemail@gmail.com wrote:
Okay. Thanks again.
On Sun, 20 Sep 2020, 2:26 pm Thierry Gosselin, notifications@github.com wrote:
Assigner package as nothing to do with this issue
Please reinstall radiator and re-start R.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thierrygosselin/radiator/issues/95#issuecomment-695819437, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWKKRTOBCFBJQRZ63XPPWLSGZCM3ANCNFSM4RRLEYFQ .
Hi Thierry, I am trying to convert a VCF to heirfstat format. But it gives an error I cannot understand. Can you please tell me what is wrong here.
my code
library(devtools) library(hierfstat) library(assigner)
samples<-radiator::genomic_converter( data ="./all_samples_varient_chrs_only_header_scaffolds_cleared.vcf", strata = "./strata_L_and_G_3.tsv", output = c( "hierfstat" # for Hierfstat ) ) %>% dplyr::glimpse()
when I run it gives me this. I have the same number of samples on my strata
Execution date@time: 20200917@2312 Folder created: -127_radiator_genomic_converter_20200917@2312 Function call and arguments stored in: radiator_genomic_converter_args_20200917@2312.tsv Filters parameters file generated: filters_parameters_20200917@2312.tsv
Importing data
Reading a large VCF...you actually have time for coffee or tea!
Data summary: number of samples: 46 number of markers: 2376960 done! timing: 183 sec
Filter monomorphic markers Number of individuals / strata / chrom / locus / SNP: Blacklisted: 0 / 0 / 0 / 934008 / 934008
Strata with low sample size detected: fig <- FALSE
Filter common markers: Number of individuals / strata / chrom / locus / SNP: Blacklisted: 0 / 0 / 0 / 1401310 / 1401310 Generating individual stats... Error: Can't recycle
..1
(size 1915532) to match..2
(size 0). Runrlang::last_error()
to see where the error occurred.Computation time, overall: 318 sec
Computation time, overall: 318 sec
Computation time, overall: 318 sec
Computation time, overall: 319 sec ######################### completed genomic_converter ##########################