Posts: 100
Threads: 5
Joined: Oct 2023
11-06-2023, 02:15 AM
(This post was last modified: 11-06-2023, 02:18 AM by Jerome.)
Admixtools1 takes a lot of time to do every run on admixR,I have heard this is because it runs F stats over and over again for each new run.
For the normal vanilla version of Admixtools1 people found a way around this by running qpfstats once in the beginning so admixtools didn't have to do it again and again.
Is something similar possible to do in admixR?
If not allowed in the base model,is it possible to add a script,or a modification to admixR for this?
Does admixR allow us to run console on it for qpAdm commands?
@norfern-ostrobothnian
@
AimSmall
You seem to know about technical issues and scripts...
Posts: 357
Threads: 26
Joined: Aug 2023
Gender: Male
Ethnicity: Colonial American
Nationality: American
Y-DNA (P): R1b-U152 >R-FTA96415
Y-DNA (M): I2-P37 > I-BY77146
mtDNA (M): J1b1a1a
mtDNA (P): H66a
You can run RScripts in the console. You'd have to way the advantages and disadvantages of running the R version vs the native Admixtool versions.
https://bodkan.net/admixr/articles/tutorial.html
https://uqrmaie1.github.io/admixtools/index.html
Might look at the section on reusing f2 stats
Quote:When testing more than one model, it makes sense to extract and re-use f2-statistics:
f2_blocks = f2_from_geno(genotype_data)
fit = qpgraph(f2_blocks, example_graph)
Posts: 100
Threads: 5
Joined: Oct 2023
(11-07-2023, 01:33 AM)AimSmall Wrote: You can run RScripts in the console. You'd have to way the advantages and disadvantages of running the R version vs the native Admixtool versions.
https://bodkan.net/admixr/articles/tutorial.html
https://uqrmaie1.github.io/admixtools/index.html
Might look at the section on reusing f2 stats
Quote:When testing more than one model, it makes sense to extract and re-use f2-statistics:
f2_blocks = f2_from_geno(genotype_data)
fit = qpgraph(f2_blocks, example_graph)
Thanks,but is it possible to use console commands in admixR?
I know admixtools2 reuses F2 but I am talking about using Admixtools1 in admixR.
Is it possible to do the qpFstats runs for Admixtools1 in AdmixR ?
In the normal console version for Admixtools1 ,we can type qpfstats and this solves the time problem as fstats are run once and not again.
But from what I have read,admixR dosent have this facility for it's Admixtools1 run-up and we will have to run all stats again and again.
Posts: 357
Threads: 26
Joined: Aug 2023
Gender: Male
Ethnicity: Colonial American
Nationality: American
Y-DNA (P): R1b-U152 >R-FTA96415
Y-DNA (M): I2-P37 > I-BY77146
mtDNA (M): J1b1a1a
mtDNA (P): H66a
You can incorporate terminal commands using system(), shell(), or system2() depending on scenario.
Code:
shell {base} R Documentation
Invoke a System Command, using a Shell
Description
shell runs the command specified by cmd, usually under a shell, because that is what the POSIX standards require.
Usage
shell(cmd, shell, flag = "/c", intern = FALSE, wait = TRUE,
translate = FALSE, mustWork = FALSE, ...)
You can also run RScripts from the terminal/console as well. You could mix and match that way as well. Perhaps mix bash code with R scripts.
Run R script from command line - Stack Overflow