Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.

Check for new replies
AdmixR Admixtools1 question
#1
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...
Reply
#2
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)
Reply
#3
(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.
Reply
#4
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
Reply

Check for new replies

Forum Jump:


Users browsing this thread: 1 Guest(s)