genomicSimulationC 0.2.6
Functions
Getting data from an Iterator

These functions take as a parameter a gsc_GenoLocation (the output of iterators), and access the data for the single genotype that the iterator has found. More...

+ Collaboration diagram for Getting data from an Iterator:

Functions

static char * gsc_get_name (const gsc_GenoLocation loc)
 Get the name of a genotype. More...
 
static void gsc_set_name (const gsc_GenoLocation loc, char *name)
 Set the name of a genotype. More...
 
static char * gsc_get_alleles (const gsc_GenoLocation loc)
 Get the alleles of a genotype. More...
 
static gsc_PedigreeID gsc_get_first_parent (const gsc_GenoLocation loc)
 Get the first/left parent of a genotype. More...
 
static gsc_PedigreeID gsc_get_second_parent (const gsc_GenoLocation loc)
 Get the second/right parent of a genotype. More...
 
static gsc_PedigreeID gsc_get_id (const gsc_GenoLocation loc)
 Get the persistent id of a genotype. More...
 
static gsc_GroupNum gsc_get_group (const gsc_GenoLocation loc)
 Get the current group membership of a genotype. More...
 
static void gsc_set_group (const gsc_GenoLocation loc, const gsc_GroupNum group)
 Set the current group membership of a genotype. More...
 
static int gsc_get_label_value (const gsc_GenoLocation loc, const int labelIndex)
 Get the value of a specific label of a genotype. More...
 

Detailed Description

These functions take as a parameter a gsc_GenoLocation (the output of iterators), and access the data for the single genotype that the iterator has found.

They are very lightweight: they have no error-checking and implemented inline.

Function Documentation

◆ gsc_get_alleles()

static char * gsc_get_alleles ( const gsc_GenoLocation  loc)
inlinestatic

Get the alleles of a genotype.

Has short name: get_alleles

Parameters
loclocation of the relevant genotype
Returns
shallow copy of the allele string of the genotype at location loc. The loci are ordered according to the genetic map (by chromosome, then by location). The entire string is 2*n characters long, where n is the number of loci. The two alleles of each locus are presented side-by-side, at positions 2i and 2i+1.

Definition at line 1400 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_get_first_parent()

static gsc_PedigreeID gsc_get_first_parent ( const gsc_GenoLocation  loc)
inlinestatic

Get the first/left parent of a genotype.

Has short name: get_first_parent

Parameters
loclocation of the relevant genotype
Returns
id of the left parent of the genotype at location loc

Definition at line 1412 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_get_group()

static gsc_GroupNum gsc_get_group ( const gsc_GenoLocation  loc)
inlinestatic

Get the current group membership of a genotype.

Has short name: get_group

Parameters
loclocation of the relevant genotype
Returns
group number of the group affiliation of the genotype at location loc

Definition at line 1451 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_get_id()

static gsc_PedigreeID gsc_get_id ( const gsc_GenoLocation  loc)
inlinestatic

Get the persistent id of a genotype.

The persistent id is the number used in pedigree tracing, and is unique for the lifetime of the simulation.

Has short name: get_id

Parameters
loclocation of the relevant genotype
Returns
id of the genotype at location loc

Definition at line 1439 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_get_label_value()

static int gsc_get_label_value ( const gsc_GenoLocation  loc,
const int  labelIndex 
)
inlinestatic

Get the value of a specific label of a genotype.

Has short name: get_label_value

Parameters
loclocation of the relevant genotype
labelIndexindex of the relevant label.
Returns
value of the labelIndexth label of the genotype at location loc

Definition at line 1478 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_get_name()

static char * gsc_get_name ( const gsc_GenoLocation  loc)
inlinestatic

Get the name of a genotype.

Has short name: get_name

Parameters
loclocation of the relevant genotype
Returns
shallow copy of the name of the genotype at location loc

Definition at line 1369 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_get_second_parent()

static gsc_PedigreeID gsc_get_second_parent ( const gsc_GenoLocation  loc)
inlinestatic

Get the second/right parent of a genotype.

Has short name: get_second_parent

Parameters
loclocation of the relevant genotype
Returns
id of the right parent of the genotype at location loc

Definition at line 1424 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_set_group()

static void gsc_set_group ( const gsc_GenoLocation  loc,
const gsc_GroupNum  group 
)
inlinestatic

Set the current group membership of a genotype.

Has short name: set_group

Parameters
loclocation of the relevant genotype
groupgsc_GroupNum of the group affiliation of the genotype at location loc after this call

Definition at line 1463 of file sim-operations.h.

+ Here is the caller graph for this function:

◆ gsc_set_name()

static void gsc_set_name ( const gsc_GenoLocation  loc,
char *  name 
)
inlinestatic

Set the name of a genotype.

Has short name: set_name

Parameters
loclocation of the relevant genotype
namename of the genotype at location loc after this call

Definition at line 1381 of file sim-operations.h.

+ Here is the caller graph for this function: