Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6024399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:08:59+00:00 2026-05-23T04:08:59+00:00

I have a MySQL table pedigree that stores all my interconnecting parentage data as

  • 0

I have a MySQL table pedigree that stores all my interconnecting parentage data as 2 adjacency lists:

Pedigree table

org_id INT UNSIGNED NOT NULL PRIMARY KEY,
dam_id INT UNSIGNED,
sire_id INT UNSIGNED,
FOREIGN KEY (org_id) REFERENCES organisms(org_id)
FOREIGN KEY (dam_id) REFERENCES organisms(org_id),
FOREIGN KEY (sire_id) REFERENCES organisms(org_id)
  • Any org_id may or may not have children. Number of children is unlimited.
  • Each org_id in the pedigree table is required to have at least a dam_id OR a sire_id
  • If an org_id has no parents, it will not be listed in the pedigree table except as a sire or dam
  • An org_id may have dam_id==sire_id

Sample Data

Org Dam Sire
23, 42, 57
26, 25, 25
27, 43, 43
28, 44, 44
30, 25, 25
31, 45, 25
32, 45, 45
33, 31, 32
34, 28, 59
35, 27, 28
36, 28, 28
39, 38, 34
41, 27, 24

I want to use R’s igraph package (unless there is something more appropriate) to display a directed DAG of my pedigrees with ancestor nodes occurring above child nodes. I am unclear about exactly what igraph needs to do this. I think I need to generate an adjacency matrix from my adjacency list, but I’m at a loss as to how to do this efficiently.

Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:09:00+00:00Added an answer on May 23, 2026 at 4:09 am

    Consider using an edge list. Two column matrix with each edge as a row in the matrix. igraph will pull the names for the nodes from the values in the edge list as well.

    g <- graph.edgelist(el)
    

    And if you need the adjacency matrix for some reason

    adj.mat <- get.adjacency(g)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have mysql table that has a column that stores xml as a string.
I have a MySQL table consisting of: CREATE TABLE `url_list` ( `id` int(10) unsigned
I have a MySQL table where all the data in one column was entered
I have a mysql table that contains IPAddress parts TABLE `EndPoints`( `EndPointId` BIGINT(19) UNSIGNED
I have a MySQL table of correlation data that I need to extract. I
I have a mysql table that relies on the unix epoch time stamp equivalent
I have a MySQL table that will only have one row. What should my
I have a MySQL table holding lots of records that i want to give
I have a mysql table that is full of text that is latin encoded.
I have a mysql table that holds comments. The comments can have sub-comments, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.