Giter Club home page Giter Club logo

langen_pipeline_version2's People

Contributors

jdalapicolla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

langen_pipeline_version2's Issues

Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'Results_Filters/PCA/Axis_coord_test_projectname_Adapative_all_20_PC.csv': No such file or directory

Hello there,
first all, thank you very much Jeronymo for the huge work and for putting these scripts online.
I was doing some analyses with a ddRAD seq database I have and I was at point #8 ("TESTING THE MISSING DATA INFLUENCE ON GENETIC STRUCTURE") of "1.1_FILTERING_SNPs". However, as I tried to do the PCA, I got the following error:

Error in file(file, ifelse(append, "a", "w")) : cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) : cannot open file 'Results_Filters/PCA/Axis_coord_test_chordo_Adapative_all_20_PC.csv': No such file or directory
("chordo" is the name of the project)
Checking on the codes, I did not notice the all_20_PC.csv file and when it should be generated.
I followed the code basically as written, script-by-script, just changing the R2 value when calculating LD.

It has to be noticed that everything goes well until that point. I honestly have no idea of what I could miss. Therefore, what could be the cause of this error?
Thanks in advance for the answer and sorry for the bother

where is the file "functions_LanGen.R" ?

#B. THE FILE "functions_LanGen.R" WITH FUNCTIONS DESIGNED FOR THIS PIPELINE IN THE WORKING DIRECTORY. YOU CAN DOWNLOAD IT IN https://github.com/jdalapicolla/ OR https://github.com/rojaff/LanGen_pipeline

Hello Ph.D Jeronymo,
Thanks very much for your code. I'm a beginner in bioinformatics. When I was studying your script, I couldn't find the file "functions_LanGen.R" .Can you tell me where it is?

which "project" object you mean here?

###7.3. FST OUTLIER DETECTION
#A. Compute results for the best run
res = Gettess3res(tess3.ls, K=optimal_K)
#B. Select FST statistics for the best run
FST = res$Fst
#C. Compute the GIF - genomic inflation factor
lambda = res$gif
lambda # 3.750238
#D. Compute adjusted p-values from the combined z-scores and plot histogram of p-values
n = dim(Q(project, run, optimal_K))[1]
z.scores = sqrt(FST*(n-optimal_K)/(1-FST))
adj.p.values = pchisq(z.scores^2/lambda, df = optimal_K-1, lower = FALSE)
hist(adj.p.values, col = "red")

Hello Jeronymo,

I am at this chunk of code, using tess3 method to do spatial genetic structuring.

at the line 905, which "project" object do you mean? Maybe you mean the best run object called "res" at line 895?

Thanks,

different qmatrix each time I run?

set.seed(13)
for (i in lambda_values){
tess3.ls = tess3(genotypes, coord = coordinates, K = K, mask = mask, lambda = i,

Hello Jeronymo, Thanks for your help along the way.

Whenever I rerun the tess3 function, I receive a different qmatrix, and result in different ancestry proportions for my barplot. Why is it so? Should I do the "set.seed()?"

I adapted your code and took out the loop and lambda parameter.

`K = c(1:5) # set the number of K to be tested
ploidy = 2 # species ploidy
CPU = 4 #Number of cores for run in parallel

tess3.ls <- tess3(X = genotypes, coord = coordinates, K = K,
method = "projected.ls", ploidy = ploidy, openMP.core.num = CPU)

q.matrix <- qmatrix(tess3.ls, K = 5)

my.colors <- c(1:5)
my.palette <- CreatePalette(my.colors, 6)
barplot(q.matrix, border = T, space = 0,
main = "Ancestry matrix",
xlab = "Individuals", ylab = "Ancestry proportions",
col.palette = my.palette) -> bp
axis(1, at = 0.5:nrow(q.matrix), labels = snps@meta[,3][bp$order], las = 3, cex.axis = 1)
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.