With a strainID and a ‘change’ position return known details
Prints the position, locus tag, product, class and subclass
Parameters: | |
---|---|
Returns: | a dictionary (JSON) |
Filter out elements in a list that are not observed a minimum of times
Parameters: | |
---|---|
Returns: | a dictionary of value:observation key value pairs |
Get the number of strains in the study
It will query all strains in the database and will factor if the reference has been included in the run (will remove it from the count)
Returns: | the number of strains as an int |
---|
Returns a list of strains stored in the database if argument strains=None
If argument strains=None we actually query the database
If argument strains is not None we actually just spit the strain string on the space delimiter.
Parameters: | strains (string or None) – a string of strain IDs |
---|---|
Returns: | a list of strains (if None, those all stored in the database) |
Return variants with a match in the “Product” with the regular_expression
Supported regular expression syntax: https://code.google.com/p/re2/wiki/Syntax
By default: print (in CSV) results with headers: StrainID, Position, LocusTag, Class, SubClass
Parameters: |
|
---|---|
Returns: | List containing JSON elements with the data: ‘StrainID’, ‘Position’, ‘LocusTag’, ‘Class’, ‘SubClass’ for each result |
Return all the variants in given [start:end] range (inclusive of)
By default: print (in CSV) results with headers: StrainID, Position, LocusTag, Class, SubClass
Examples:
# All variants in the 1Kb range of 60K-61K
fab variants.get_variants_in_range:60000,61000
#Nail down on a particular position and redefine the output
fab variants.get_variants_in_range:60760,60760,plucking='StrainID Position Class Product'
Parameters: |
|
---|---|
Returns: | List containing JSON elements with the data: ‘StrainID’, ‘Position’, ‘LocusTag’, ‘Class’, ‘SubClass’ for each result |
Generate a PDF of SNP positions for given strains using GenomeDiagram
Places the reference features on the outerring
User has to provide a space dlimited list of strains (see warning below)
Pull all the positions that we observe changes
Note
This query could be sped up?
Print the number of variants and variant classes for all strains
Example usage:
fab variants.strain_variant_stats
fab variants.strain_variant_stats:'AEXT01-FSL-S3-026 QMA0306.gz'
Parameters: |
|
---|---|
Returns: | a list of results in CSV |
Return the (default = 100) prevalent variant positions
Example usage:
fab variants.variant_hotspots
fab variants.variant_hotspots:250
Parameters: | most_prevalent – [def = 100] |
---|
Return positions that have at least this many variants
By default the minimum number will be equal to all the strains in the study.
Example usage:
fab variants.variant_positions_within_atleast fab variants.variant_positions_within_atleast:16
Parameters: | minimum_at_position – [def = None] minimum number of variants conserved in N strains at this positions |
---|
Get variant positions that differentiate two given sets of strains
Example usage:
fab $BANZAIDB_LOCATION/fabfile/' variants.what_differentiates_strains:ASCC880519,'ASCC881171 ASCC881475'
Parameters: |
|
---|---|
Returns: | 2 lists of JSON that define the variants that are unique to set1 (1st) and set2 (2nd) |