GithubHelp home page GithubHelp logo

loadConvergenceData about methylinheritance HOT 8 CLOSED

adeschen avatar adeschen commented on September 27, 2024
loadConvergenceData

from methylinheritance.

Comments (8)

adeschen avatar adeschen commented on September 27, 2024

Hi,

Have you used different directories for permutation and observation results? If so, there is a bug in the code causing the error "seq.default(by, nbFiles, by) : wrong sign in 'by' argument".

Otherwise, the error "seq.default(by, nbFiles, by) : wrong sign in 'by' argument" can also be generated when the "by" argument is larger than the number of permutations in the permutation directory.

I will push a correction to the bug.

Best,
Astrid

from methylinheritance.

Donovan-chan avatar Donovan-chan commented on September 27, 2024

from methylinheritance.

adeschen avatar adeschen commented on September 27, 2024

Hi Donavan,

I am doing well and I do remember you.

I am currently working on fixing the bug related to using different directories for observation and permutation. The correction should be pushed today.

However, I quick fix that you can try with the unmodified code is to copy the observation file into the permutation directory and use the same directory in the loadConvergenceData() method.

Technically, you don't need to add the "/" between the "permutationResultsDir" and " toupper(type)" in the following code:

`

filesInDir <- list.files(path = paste0(permutationResultsDir, toupper(type),
                    "/"), pattern = "[[:digit:]].RDS", all.files = FALSE,
                    full.names = TRUE, recursive = FALSE,
                    ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE)

`

As the "/" is already added at the beginning of the function:

`

if (substr(permutationResultsDir, nchar(permutationResultsDir),
            nchar(permutationResultsDir)) != "/") {
    permutationResultsDir <- paste0(permutationResultsDir, "/")
}

`

Best,
Astrid

from methylinheritance.

Donovan-chan avatar Donovan-chan commented on September 27, 2024

from methylinheritance.

adeschen avatar adeschen commented on September 27, 2024

Hi Donavan,

As long as you use the same directory path for both analysisResultsDir and permutationResultsDir arguments in the loadConvergenceData(analysisResultsDir=PATH, permutationResultsDir=PATH, ...) is should work.

Coping the observation file to the permutation directory or copying the permutation files to the observation directory should give the same result.

Best,
Astrid

from methylinheritance.

adeschen avatar adeschen commented on September 27, 2024

Hi Donavan,

I have commit the fix to Bioconductor. The corrected version of the package should be available in Bioconductor development version in a few days.

Meanwhile, the package can be downloaded using devtools package:

`

 library(devtools)

 devtools::install_github('adeschen/methylInheritance')

`

A test that shows the corrected code is working:

`

library(methylInheritance)

 data(samplesForTransgenerationalAnalysis)

 runPermutation(methylKitData = samplesForTransgenerationalAnalysis,
     outputDir="./test_permutations", runObservationAnalysis=FALSE, type="sites", nbrPermutations=5, vSeed=221)

 runObservation(methylKitData = samplesForTransgenerationalAnalysis,
     outputDir="./test_observation", type="sites", vSeed=221)

 results <- loadConvergenceData(analysisResultsDir="./test_observation",
     permutationResultsDir="./test_permutations", type="sites", inter="i2", position=1, by=1)

`

Can you confirm that it is working for you?

Thanks,
Astrid

from methylinheritance.

Donovan-chan avatar Donovan-chan commented on September 27, 2024

from methylinheritance.

adeschen avatar adeschen commented on September 27, 2024

Hi Donavan,

I am glad I could help. I will close the issue.

If you have any other problem/issue/question, don't hesitate to contact me.

Best,
Astrid

from methylinheritance.

Related Issues (11)

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.