Marker Relatedness
Marker Relatedness using Select Rows
Summary: Runs the Marker Relatedness analysis for a specified data table, configuring various settings such as marker column group, principal components, clustering, and kinship type.
Code:
dt = Open("data_table.jmp");
dt << Clear Select << Select Rows( Index( 11, 1000 ) ) << Delete Rows;
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Principal Components( 1 ),
Clustering( 1 ),
Ploidy( 2 ),
Set Random Seed( 0 ),
Missing Marker Imputation Method( "NONEHWE" ),
Kinship Type( "Identical by State" ),
SendToReport(
Dispatch( {"Marker Relatedness", "Hierarchical Clustering", "Dendrogram"}, "Clust Dendro", FrameBox, {Frame Size( 35, 700 )} )
)
);
obj << Merge Kinship Table;
Code Explanation:
- Open data table.
- Clear existing selections.
- Select rows 11 to 1000.
- Delete selected rows.
- Run Marker Relatedness analysis.
- Specify markers column group.
- Use 1 principal component.
- Enable clustering.
- Set ploidy to 2.
- Set random seed to 0.
- Use NONEHWE imputation method.
- Set kinship type to IBS.
- Adjust dendrogram frame size.
- Merge kinship table.
Example 1
Summary: Runs marker relatedness analysis by opening a data table and executing the Marker Relatedness() function.
Code:
Open("data_table.jmp");
Marker Relatedness();
Code Explanation:
- Open data table;
- Perform marker relatedness analysis.
Example 2
Summary: Executes Marker Relatedness analysis on a data table, opening and assigning it to a variable dt.
Code:
Open("data_table.jmp");
Marker Relatedness();
dt = Open("data_table.jmp");
dt << Marker Relatedness();
dt = Open("data_table.jmp");
Code Explanation:
- Open data table;
- Run Marker Relatedness analysis.
- Open data table;
- Assign data table to dt.
- Run Marker Relatedness on dt.
- Open data table;
Example 3
Summary: Runs the Marker Relatedness analysis in JMP, specifying marker column group, ploidy, and kinship type, then merges the kinship table and re-runs the analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Unthreaded( 0 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
);
obj << Merge Kinship Table;
obj << Redo Analysis;
Code Explanation:
- Open data table.
- Run Marker Relatedness analysis.
- Specify marker column group.
- Set ploidy to 2.
- Disable threading.
- Set random seed.
- Disable missing marker imputation.
- Use Identical by State kinship type.
- Merge kinship table.
- Redo analysis.
Marker Relatedness using Is Scriptable
Example 1
Summary: Executes a Marker Relatedness analysis on a data table, specifying marker column group, ploidy level, random seed, imputation method, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Set Random Seed( 0 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Additive" ),
Additive Type( "Diploid Method 2" )
)
);
Code Explanation:
- Open data table.
- Check scriptability.
- Run Marker Relatedness analysis.
- Specify Marker column group.
- Set ploidy level to 2.
- Set random seed to 0.
- Disable HWE for imputation.
- Select additive kinship type.
- Use Diploid Method 2.
Example 2
Summary: Executes a Marker Relatedness analysis on a data table, grouping by Sex and setting specific parameters for ploidy, imputation method, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
By( :Sex ),
Ploidy( 2 ),
Unthreaded( 0 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
)
);
Code Explanation:
- Open data table;
- Check scriptability.
- Launch Marker Relatedness analysis.
- Specify Markers column group.
- Group by Sex.
- Set Ploidy to 2.
- Enable threading.
- Set random seed to 12345.
- Use HWE OFF for imputation.
- Select Identical by State kinship.
Example 3
Summary: Runs marker relatedness analysis on a data table, utilizing principal components, clustering, and ploidy adjustment to identify genetic relationships.
Code:
dt1 = Open("data_table.jmp");
test = Is Scriptable(
dt1 << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Principal Components( 1 ),
Clustering( 1 ),
Ploidy( 2 ),
Unthreaded( 1 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
)
);
Code Explanation:
- Open data_table data
- Check if scriptable.
- Run marker relatedness analysis.
- Use markers column group.
- Apply principal components.
- Enable clustering.
- Set ploidy to 2.
- Disable threading.
- Set random seed to 12345.
- Use HWE OFF imputation.
Example 4
Summary: Executes a Marker Relatedness analysis on a data table, configuring specific parameters such as ploidy, random seed, and imputation method.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Dominance" ),
Dominance Type( "Diploid Method 2" )
)
);
Code Explanation:
- Open data table;
- Check if scriptable.
- Run Marker Relatedness analysis.
- Select Markers column group.
- Set ploidy to 2.
- Set random seed to 12345.
- Use HWE OFF imputation method.
- Choose Dominance kinship type.
- Select Diploid Method 2 dominance type.
Example 5
Summary: Executes a Marker Relatedness analysis on a data table, specifying marker column group, ploidy, random seed, missing marker imputation method, kinship type, additive type, and dominance type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Epistasis" ),
Additive Type( "Diploid Method 1" ),
Dominance Type( "Diploid Method 2" ),
Epistasis Type( "Additive by Dominance" )
)
);
Code Explanation:
- Open data table.
- Check scriptability.
- Run Marker Relatedness analysis.
- Specify marker column group.
- Set ploidy to 2.
- Set random seed.
- Disable missing marker imputation.
- Choose kinship type.
- Select additive type.
- Select dominance type.
- Select epistasis type.
Example 6
Summary: Executes a Marker Relatedness analysis on a data table, specifying marker column group, ploidy, random seed, imputation method, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Set Random Seed( 0 ),
Missing Marker Imputation Method( "Specified" ),
Imputation Value( 0 ),
Kinship Type( "Additive" ),
Additive Type( "Diploid Method 1" )
)
);
Code Explanation:
- Open data table.
- Check if scriptable.
- Run Marker Relatedness analysis.
- Specify marker column group.
- Set ploidy to 2.
- Set random seed to 0.
- Use specified imputation method.
- Set imputation value to 0.
- Select additive kinship type.
- Use diploid method 1.
Example 7
Summary: Executes a Marker Relatedness analysis, configuring specific parameters such as marker column group, ploidy level, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Unthreaded( 0 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
);
obj << Merge Kinship Table;
);
Code Explanation:
- Open data table.
- Check if scriptable.
- Run Marker Relatedness analysis.
- Specify marker column group.
- Set ploidy level.
- Disable threading.
- Set random seed.
- Disable missing marker imputation.
- Select kinship type.
- Merge kinship table.
Example 8
Summary: Executes a Marker Relatedness analysis on a specified data table, setting various parameters such as ploidy, imputation method, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "Specified" ),
Imputation Value( 0 ),
Kinship Type( "Additive" ),
Additive Type( "Diploid Method 1" )
);
obj << Merge Kinship Table;
);
Code Explanation:
- Open data_table data
- Check if scriptable.
- Run Marker Relatedness analysis.
- Specify Marker column group.
- Set ploidy to 2.
- Set random seed to 12345.
- Use specified imputation method.
- Set imputation value to 0.
- Choose additive kinship type.
- Use Diploid Method 1 for additive type.
- Merge kinship table.
Example 9
Summary: Executes a Marker Relatedness analysis on a data table, utilizing specific settings for marker group, ploidy, random seed, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
)
);
Code Explanation:
- Open data table.
- Assign data table to
dt. - Check if scriptable.
- Run Marker Relatedness analysis.
- Use "Markers" column group.
- Set ploidy to 2.
- Set random seed to 12345.
- Disable HWE for missing marker imputation.
- Use Identical by State kinship type.
- Store result in
test.
Example 10
Summary: Executes a Marker Relatedness analysis on a data table, specifying markers column group, principal components, clustering, ploidy, and imputation method.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Principal Components( 1 ),
Clustering( 1 ),
Ploidy( 2 ),
Unthreaded( 1 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
)
);
Code Explanation:
- Open data_table data
- Check scriptability.
- Run Marker Relatedness analysis.
- Specify markers column group.
- Use 1 principal component.
- Enable clustering.
- Set ploidy to 2.
- Disable threading.
- Set random seed to 12345.
- Use HWE OFF imputation.
Example 11
Summary: Launches Marker Relatedness analysis on a data table, specifying marker columns, sample IDs, ploidy level, and kinship type.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Sample ID( :SampleID ),
Ploidy( 2 ),
Unthreaded( 0 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
)
);
Code Explanation:
- Open data table;
- Check scriptability.
- Launch Marker Relatedness.
- Define marker columns.
- Specify sample IDs.
- Set ploidy level.
- Disable threading.
- Initialize random seed.
- Configure imputation method.
- Select kinship type.
Example 12
Summary: Runs the Marker Relatedness analysis in JMP, configuring parameters such as ploidy, threading, and imputation method to generate square and stacked kinship tables.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Relatedness(
Marker( Column Group( "Markers" ) ),
Ploidy( 2 ),
Unthreaded( 0 ),
Set Random Seed( 12345 ),
Missing Marker Imputation Method( "HWE OFF" ),
Kinship Type( "Identical by State" )
);
obj << Save Square Kinship Table;
obj << Save Stacked Kinship Table;
);
Code Explanation:
- Open data_table data
- Check scriptability of Marker Relatedness.
- Launch Marker Relatedness analysis.
- Select markers from column group.
- Set ploidy to 2.
- Disable threading.
- Set random seed to 12345.
- Use HWE OFF for imputation.
- Select Identical by State kinship type.
- Save square kinship table.
- Save stacked kinship table.