Marker Admixture
Example 1
Summary: Performs the Marker Admixture analysis on a data table, allowing for interactive exploration of admixed samples.
Code:
Open("data_table.jmp");
Marker Admixture();
Code Explanation:
- Open data table;
- Run Marker Admixture analysis.
Example 2
Summary: Executes Marker Admixture analysis on a dataset, with repeated opening and re-execution of the analysis.
Code:
Open("data_table.jmp");
Marker Admixture();
dt = Open("data_table.jmp");
dt << Marker Admixture();
dt = Open("data_table.jmp");
Code Explanation:
- Open data_table data
- Run Marker Admixture analysis.
- Open data_table data again.
- Run Marker Admixture analysis on dataset.
- Open data_table data once more.
Example 3
Summary: Executes a Marker Admixture analysis and report generation, with interactive features for toggling checkboxes, selecting combo boxes, and editing number edit boxes.
Code:
dt = Open("data_table.jmp");
obj = dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Set Random Seed( 12345 ), Missing Marker Imputation Method( "HWE On" ), Imputation Value( 1 ) )
);
rpt = obj << report;
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set;
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Combo Box( 1 )] << Set( 1 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set();
rpt[Combo Box( 1 )] << Set( 3 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Combo Box( 1 )] << Set( 4 );
rpt["Launch", "Advanced Options", Number Edit Box( 1 )] << Set( 2 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set;
rpt[Combo Box( 1 )] << Set( 4 );
rpt["Launch", "Advanced Options", Number Edit Box( 1 )] << Set( 1 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
obj << (Fit[1] << Remove Fit( 1 ));
obj << (Fit[2] << Remove Fit( 1 ));
obj << (Fit[3] << Remove Fit( 1 ));
obj << (Fit[4] << Remove Fit( 1 ));
obj << (Fit[5] << Remove Fit( 1 ));
obj << (Fit[6] << Remove Fit( 1 ));
Code Explanation:
- Open data table.
- Run Marker Admixture analysis.
- Retrieve analysis report.
- Toggle first checkbox in Launch outline.
- Click first button in Launch outline.
- Set first combo box to option 1.
- Click first button in Launch outline.
- Toggle first checkbox in Launch outline.
- Set first combo box to option 3.
- Click first button in Launch outline.
- Set first combo box to option 4.
- Set first number edit box in Advanced Options to 2.
- Click first button in Launch outline.
- Toggle first checkbox in Launch outline.
- Set first combo box to option 4.
- Set first number edit box in Advanced Options to 1.
- Click first button in Launch outline.
- Remove first fit from Fit object.
- Remove second fit from Fit object.
- Remove third fit from Fit object.
- Remove fourth fit from Fit object.
- Remove fifth fit from Fit object.
- Remove sixth fit from Fit object.
Example 4
Summary: Performs the Marker Admixture analysis on a data table, enabling parallel plots for individuals and markers, as well as clustering for both.
Code:
Open("data_table.jmp");
dt = Current Data Table();
dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Parallel Plot for Individuals( 1 ), Parallel Plot for Markers( 1 ), Cluster Individuals( 1 ), Cluster Markers( 1 ) )
);
Code Explanation:
- Open data table.
- Assign current data table.
- Run Marker Admixture analysis.
- Specify marker column group.
- Enable parallel plot for individuals.
- Enable parallel plot for markers.
- Enable clustering for individuals.
- Enable clustering for markers.
Example 5
Summary: Runs marker admixture analysis to group markers by column and analyze by sex, generating parallel plots for individuals and markers, and clustering both.
Code:
dt = Open("data_table.jmp");
dt = Current Data Table();
dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
By( :Sex ),
Fit( Parallel Plot for Individuals( 1 ), Parallel Plot for Markers( 1 ), Cluster Individuals( 1 ), Cluster Markers( 1 ) )
);
Code Explanation:
- Open data table;
- Set current data table.
- Perform marker admixture analysis.
- Group markers by column.
- Analyze by sex.
- Generate parallel plot for individuals.
- Generate parallel plot for markers.
- Cluster individuals.
- Cluster markers.
Example 6
Summary: Performs the Marker Admixture analysis on a data table, grouping markers by 'Markers' column and fitting parallel plots for individuals and markers, with optional clustering by sex.
Code:
Open("data_table.jmp");
dt = Current Data Table();
dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Parallel Plot for Individuals( 1 ), Parallel Plot for Markers( 1 ), Cluster Individuals( 1 ), Cluster Markers( 1 ) )
);
dt = Open("data_table.jmp");
dt = Current Data Table();
dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
By( :Sex ),
Fit( Parallel Plot for Individuals( 1 ), Parallel Plot for Markers( 1 ), Cluster Individuals( 1 ), Cluster Markers( 1 ) )
);
Code Explanation:
- Open data_table data
- Assign current data table to dt.
- Run Marker Admixture analysis.
- Group markers by "Markers" column.
- Fit parallel plot for individuals.
- Fit parallel plot for markers.
- Cluster individuals.
- Cluster markers.
- Reopen data_table data.
- Assign current data table to dt.
- Run Marker Admixture analysis by sex.
- Group markers by "Markers" column.
- Fit parallel plot for individuals.
- Fit parallel plot for markers.
- Cluster individuals.
- Cluster markers.
Marker Admixture using If
Example 1
Summary: Performs the Marker Admixture analysis and report generation in JMP Pro, with interactive features for checkbox setting, button clicking, and combo box value selection.
Code:
If( Contains( JMP Product Name(), "Pro" ),
dt = Open("data_table.jmp");
obj = dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Set Random Seed( 12345 ), Missing Marker Imputation Method( "HWE On" ), Imputation Value( 1 ) )
);
obj << (Fit[1] << Remove Fit( 1 ));
dt = Open("data_table.jmp");
obj = dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Set Random Seed( 12345 ), Missing Marker Imputation Method( "HWE On" ), Imputation Value( 1 ) )
);
rpt = obj << report;
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set;
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Combo Box( 1 )] << Set( 1 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set();
rpt[Combo Box( 1 )] << Set( 3 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Combo Box( 1 )] << Set( 4 );
rpt["Launch", "Advanced Options", Number Edit Box( 1 )] << Set( 2 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set;
rpt[Combo Box( 1 )] << Set( 4 );
rpt["Launch", "Advanced Options", Number Edit Box( 1 )] << Set( 1 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
obj << (Fit[1] << Remove Fit( 1 ));
obj << (Fit[2] << Remove Fit( 1 ));
obj << (Fit[3] << Remove Fit( 1 ));
obj << (Fit[4] << Remove Fit( 1 ));
obj << (Fit[5] << Remove Fit( 1 ));
obj << (Fit[6] << Remove Fit( 1 ));
);
Code Explanation:
- Check for JMP Pro.
- Open data_table data
- Run Marker Admixture analysis.
- Remove first fit.
- Reopen data_table data.
- Run Marker Admixture analysis again.
- Generate report.
- Set checkbox.
- Click button.
- Set combo box value.
- Click button.
- Set checkbox.
- Set combo box value.
- Click button.
- Set combo box value.
- Set advanced option.
- Click button.
- Set checkbox.
- Set combo box value.
- Set advanced option.
- Click button.
- Remove all fits.
Example 2
Summary: Performs the Marker Admixture analysis on a data table, retrieves all data tables, and counts their number, while checking if JMP is running in Pro version.
Code:
If( Contains( JMP Product Name(), "Pro" ),
dt = Open("data_table.jmp");
dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Fit, Fit, Fit );
dtlist = Get Data Table List();
N_table = N Items( dtlist );
dtName = Left( Current Data Table() << Get Name, 18 );
e_dtName = "data_table";
);
Code Explanation:
- Check if JMP is Pro version.
- Open data table.
- Run Marker Admixture analysis.
- Retrieve all data tables.
- Count number of data tables.
- Get current data table name.
- Limit name to 18 characters.
- Define expected data table name.
- End if condition.
Example 3
Summary: Executes Marker Admixture analysis on a data table, with options to run by sex or without grouping.
Code:
If( Contains( JMP Product Name(), "Pro" ),
dt = Open("data_table.jmp");
dt = Current Data Table();
dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Parallel Plot for Individuals( 1 ), Parallel Plot for Markers( 1 ), Cluster Individuals( 1 ), Cluster Markers( 1 ) )
);
dt = Open("data_table.jmp");
dt = Current Data Table();
dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
By( :Sex ),
Fit( Parallel Plot for Individuals( 1 ), Parallel Plot for Markers( 1 ), Cluster Individuals( 1 ), Cluster Markers( 1 ) )
);
);
Code Explanation:
- Check for JMP Pro.
- Open data_table data
- Set current data table.
- Run Marker Admixture analysis.
- Open data_table data again.
- Set current data table.
- Run Marker Admixture analysis by sex.
Example 4
Summary: Runs marker admixture analysis and report generation in JMP Pro, utilizing the Marker Admixture platform to cluster individuals and markers.
Code:
If( Contains( JMP Product Name(), "Pro" ),
dt = Open("data_table.jmp");
obj = dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Fit() );
rpt = obj << report;
obj << (Fit[1] << Cluster Individuals());
rpt = obj << report;
obj << (Fit[1] << Cluster Markers());
rpt = obj << report;
);
Code Explanation:
- Check if JMP Pro is installed.
- Open data_table data
- Perform marker admixture analysis.
- Generate initial report.
- Cluster individuals in fit.
- Update report after clustering.
- Cluster markers in fit.
- Update report after clustering.
- End script execution.
Example 5
Summary: Performs the Marker Admixture analysis in JMP Pro, configuring fit options and generating a report with interactive features.
Code:
If( Contains( JMP Product Name(), "Pro" ),
dt = Open("data_table.jmp");
obj = dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit( Set Random Seed( 12345 ), Missing Marker Imputation Method( "HWE On" ), Imputation Value( 1 ) )
);
rpt = obj << report;
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set;
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Combo Box( 1 )] << Set( 1 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set();
rpt[Combo Box( 1 )] << Set( 3 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Combo Box( 1 )] << Set( 4 );
rpt["Launch", "Advanced Options", Number Edit Box( 1 )] << Set( 2 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Launch" )][CheckBoxBox( 1 )] << set;
rpt[Combo Box( 1 )] << Set( 4 );
rpt["Launch", "Advanced Options", Number Edit Box( 1 )] << Set( 1 );
rpt[Outline Box( "Launch" )][Button Box( 1 )] << Click();
Imputated = rpt["Model Comparison", Number Col Box( "Imputation Value" )] << get as matrix;
predictors = rpt["Model Comparison", Number Col Box( "Predictors" )] << get as matrix;
obj << (Fit[6] << Remove Fit( 1 ));
obj << (Fit[5] << Remove Fit( 1 ));
obj << (Fit[4] << Remove Fit( 1 ));
obj << (Fit[3] << Remove Fit( 1 ));
obj << (Fit[2] << Remove Fit( 1 ));
obj << (Fit[1] << Remove Fit( 1 ));
);
Code Explanation:
- Check if JMP is Pro.
- Open data table.
- Launch Marker Admixture analysis.
- Set marker column group.
- Configure fit options.
- Generate initial report.
- Toggle checkbox and click button.
- Set combo box value to 1.
- Click button again.
- Toggle checkbox and set combo box to 3.
- Click button again.
- Set combo box to 4.
- Set advanced option number.
- Click button again.
- Toggle checkbox and set combo box to 4.
- Set advanced option number to 1.
- Click button again.
- Extract imputed values matrix.
- Extract predictors matrix.
- Remove all fits from model.
Marker Admixture using Is Scriptable
Example 1
Summary: Process of marker admixture and clustering in a data table, utilizing the
Marker AdmixtureandFitfunctions to identify patterns.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Fit() );
obj << (Fit[1] << Cluster Markers());
);
Code Explanation:
- Open data table;
- Check scriptability.
- Run Marker Admixture.
- Specify marker columns.
- Perform fitting.
- Access fit object.
- Cluster markers.
- End script block.
Example 2
Summary: Performs the Marker Admixture analysis on a data table, selecting marker column groups and performing fit operations with fixed parameters and 3 ancestral populations.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit,
Fit( Estimation Method( "Fixed Parameter" ), Number of Ancestral Populations( 3 ) ),
Set( Estimation Method( "Fixed Parameter" ), Number of Ancestral Populations( 3 ) )
);
obj << Compare( LogLikehood( 0 ) );
);
Code Explanation:
- Open data table.
- Check if scriptable.
- Run Marker Admixture analysis.
- Select marker column group.
- Perform fit operation.
- Set estimation method to Fixed Parameter.
- Specify 3 ancestral populations.
- Repeat set operation.
- Compare using LogLikelihood.
- End script execution.
Example 3
Summary: Process of running Marker Admixture analysis on a data table, selecting the 'Markers' column group and fitting an admixture model.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Fit() );
obj << (Fit[1] << Copy Parameters to Launch());
);
Code Explanation:
- Open data table.
- Check if scriptable.
- Run Marker Admixture analysis.
- Select Markers column group.
- Fit admixture model.
- Copy fit parameters.
Example 4
Summary: Performs the Marker Admixture analysis for a data table, specifying markers column group, estimation method, number of ancestral populations, and imputation method.
Code:
dt = Open("data_table.jmp");
test = Is Scriptable(
obj = dt << Marker Admixture(
Marker( Column Group( "Markers" ) ),
Fit(
Estimation Method( "Fixed Parameter" ),
Number of Ancestral Populations( 3 ),
Unthreaded( 1 ),
Missing Marker Imputation Method( "Specified" ),
Imputation Value( 1 )
)
)
);
Code Explanation:
- Open data_table data
- Check scriptability.
- Run Marker Admixture analysis.
- Specify markers column group.
- Set estimation method to fixed parameter.
- Define number of ancestral populations as 3.
- Enable unthreaded processing.
- Choose specified imputation method.
- Set imputation value to 1.
Example 5
Summary: Runs marker admixture analysis on data_table.jmp, using the Marker Admixture platform to fit a model and label by sex.
Code:
test = Is Scriptable(
dt = Open("data_table.jmp");
dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Label( :Sex ), Fit );
);
Code Explanation:
- Check scriptability.
- Open data_table data
- Apply marker admixture analysis.
- Use markers column group.
- Label by sex.
- Perform fit operation.