GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Need help with the data analysis.

Click to view RSS...
Author I'm doing a pedigree analysis for inherited disease such as thalassemia and G6PD for my final year project.
Posted Sunday, March 3, 2013 - Post #31388
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 9:23 PM
Posts: 3,464, Visits: 26,854
GenoPro has a powerful Report Generator that enables most requirements to be met with a knowledge of Javascript and the GenoPro SDK.

Your statistics can be produced with a fairly simple Javascript
<%[
var Stats = {}, idx, obj, map, map0=GenoMaps(0).Name;
// Count genders of Individuals in each GenoMap
for (idx=0; idx<Individuals.Count; idx++) {
obj = Individuals(idx);
map = (obj.Position.GenoMap ? obj.Position.GenoMap : map0);
if (!Stats[map]) {
Stats[map]={};
Stats[map].M=0; Stats[map].F=0; Stats[map].P=0;Stats[map].C=0;
}
Stats[map][obj.Gender.ID]++;
}
// Count 1st Cousin 'families' in each GenoMap
for (idx = 0; idx<Families.Count;idx++) {
        obj = Families(idx);
map = (obj.Position.GenoMap ? obj.Position.GenoMap : map0);
if ((obj.Parents(1).Mother.Family.ID != '' && 
(obj.Parents(1).Mother.Family.ID == (obj.Parents(0).Mother.Family.ID || obj.Parents(0).Father.Family.ID))) ||
(obj.Parents(1).Father.Family.ID != '' && 
(obj.Parents(1).Father.Family.ID == (obj.Parents(0).Mother.Family.ID || obj.Parents(0).Father.Family.ID)))) Stats[map].C++;
}
for (idx=0; idx<GenoMaps.Count; idx++) {
map = GenoMaps(idx).Name;
if (Stats[map]) Report.LogComment(map+': Males '+Stats[map].M + '; Females '+Stats[map].F + '; 1st Cousin Families '+Stats[map].C, '#000000');

I have attached to this post a zipped custom report 'skin' using the above script, download it and unzip into a folder BELOW your GenoPro skins folder and then run as a GenoPro report.

Sample output in the 'Generate Report' Message Log:

Generating report to 'D:\Users\Public\GenoPro Reports\test\'
Cloning document HarryPotter...
Opening configuration file Config.xml for skin '\Stats\*  (Statistics)'...
Loading Dictionary.xml...
[0.00] Processing template 'Stats.js'...
Potter: Males 13; Females 6; 1st Cousin Families 0
Weasley: Males 11; Females 7; 1st Cousin Families 0
Black: Males 32; Females 25; 1st Cousin Families 1
Gaunt: Males 4; Females 2; 1st Cousin Families 0
Hogwarts: Males 35; Females 27; 1st Cousin Families 0






'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Stats.zip (70 views, 929 bytes)
Posted Sunday, March 3, 2013 - Post #31386
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Customers
GenoPro version: 2.5.4.1

Last Login: Sunday, May 19, 2013
Posts: 1, Visits: 7
Hey guys, I'm new here, and I'm doing a pedigree analysis for inherited disease such as thalassemia and G6PD for my final year project.

I want to know if genopro can generate a report that include how many individuals in a genomap, how many male and female, how many first cousin marriage are there. So can anyone help me?
It would help a lot if you can give me a suggestion to improve my thesis writing. 

I'll put your name in my thesis... Wink


Thank you very much. 


Edited: Wednesday, March 6, 2013 by GenoProSupport


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse