Giter Club home page Giter Club logo

Comments (4)

magnusdv avatar magnusdv commented on June 26, 2024

Hi,
That's an interesting question. Nothing like that is implemented in the ped suite currently, and I cannot recall having seen it elsewhere either. I'd be interested in knowing what you come up with, though!

from pedsuite.

BoPeng avatar BoPeng commented on June 26, 2024

Thanks for your reply. If I am going to write an R function for this, what pedsuite package can I use to load the pedigree, easily access someone's parents and siblings and their information, and save the pedigree back?

from pedsuite.

magnusdv avatar magnusdv commented on June 26, 2024

Within the ped suite framwork, pedigrees are represented as ped objects, which contains the pedigree info and (optionally) marker genotypes. Pedigrees can be loaded from "ped" files with readPed() or built from scratch. The pedtools vignette has some examples: https://cran.r-project.org/web/packages/pedtools/vignettes/pedtools.html

Once you have a pedigree, you can find identify all kinds of relatives, e.g.:

library(pedtools)

# Pedigree with 3 sibs
x = nuclearPed(3)
x
#>  id fid mid sex
#>   1   *   *   1
#>   2   *   *   2
#>   3   1   2   1
#>   4   1   2   1
#>   5   1   2   1
parents(x, 3)
#> [1] "1" "2"
father(x, 3)
#> [1] "1"
siblings(x, 3)
#> [1] "4" "5"

The ped class does not store age information or other clinical data, so you would have to keep these in a separate container.

from pedsuite.

BoPeng avatar BoPeng commented on June 26, 2024

Thank you very much!

from pedsuite.

Related Issues (2)

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.