MCPcopy Create free account

hub / github.com/CoBiG2/RAD_Tools / functions

Functions119 in github.com/CoBiG2/RAD_Tools

↓ 3 callersFunctionparse_taxa_file
Returns a list of taxa from a taxa file
vcf2bcg.py:35
↓ 3 callersFunctionparse_vcf
Parses a VCF file and retains the location of all SNPs in the genome as a list of tupples
compare_maps.py:47
↓ 2 callersFunctioncompare_pairs
Main function comparing the information contained in a VCF file between pairs of technical replicates. The relevant statistics will be stored
compare_pairs.py:76
↓ 2 callersFunctionparse_file
(input_file)
blast_tab_parser.py:7
↓ 2 callersFunctionparse_fst
Parses an Fst file from vcftools. Returns a dictionary with the chromosome and postition as key and fst value as value. If he fst_range a
vcftools_stats.py:338
↓ 2 callersFunctionparse_taxa_file
Returns a list of taxa from a taxa file
vcftools_stats.py:328
↓ 2 callersFunctionremove_sites
Removes invariable sites from a VCF file. This assumes that the genotype columns start at the 10th column until the last column :param vc
vcf_parser.py:53
↓ 2 callersFunctionwrite_output
(input_file, saveLines, outputFile)
blast_tab_parser.py:48
↓ 2 callersFunctionwrite_vcf_body
(vcf_path, output_path, locus_length)
keep_central_snp.py:55
↓ 2 callersFunctionwrite_vcf_headers
(vcf_path, output_path)
keep_central_snp.py:39
↓ 1 callersFunctionGPhoCS_writer
Gets a loci list, and a loci file and filters it. It then saves the data in GPhoCS format.
loci_and_vcf_to_GPhoCS.py:34
↓ 1 callersFunctionLoci_counter
Counts the number of '//', adds that number to the string and prints it to stdout.
Loci_counter.py:21
↓ 1 callersFunctionVCF_modifier
Grabs a VCF file and adds "SNP_##" to the end of the line, to match those outputed by PDGspider when converting to to other formats.
VCF_corresponder.py:5
↓ 1 callersFunctionVCF_parser
Parse the VCF and return a list with the loci that contain SNPs.
Loci_filter_from_vcf.py:20
↓ 1 callersFunctionalternative_snp_distribution
Parses a VCF file and plots the frequency of the number of alternative SNPs for each taxon
vcftools_stats.py:257
↓ 1 callersFunctionargument_parser
Parses the list of arguments as implemented in argparse.
outlier_removal.py:7
↓ 1 callersFunctionblast_tab_parser
Parses a BLAST tabular format with the following fields: "qseqid sseqid qlen evalue nident length sstart send" Returns a dict identified
bl_gff_2_annotation.py:20
↓ 1 callersFunctioncompute_pairwise_ld
Computes a triangular matrix for D' and r2 for each combinaiton in genotype_list
pairwise_ld.py:55
↓ 1 callersFunctionconsensus
Takes a list of sequences and returns a single consensus sequence. There is an assumption that sequences have the same sequence lenght.
loci_consensus.py:42
↓ 1 callersFunctionconvert_genotype
Converts a genotype string from the vcf ("0|0") into an actual genotype ("A"), provided the variants for that particular site
VCF2phy.py:61
↓ 1 callersFunctionconvert_vcf
Converts a vcf file into bcg format according to the taxa provided for parental populations (p1 and p2) and hybrid population
vcf2bcg.py:45
↓ 1 callersFunctioncreate_consensus
The parsing of the .loci file and creation and writting of consensus sequences to output_file are performed together to improve performance.
loci_consensus.py:109
↓ 1 callersFunctionfas_writer
Writes the output in fasta format. Arguments as in phy_writer function
loci2phy.py:123
↓ 1 callersFunctionfilehandler
Doc here
BioGenepop.py:44
↓ 1 callersFunctionfilter_center_snp
Filters a VCF file so that only one SNP per locus (the one closer to the center) is retained
vcf_parser.py:152
↓ 1 callersFunctionfilter_fst
Filters a vcf_file so that it includes only the SNPs from the fst_storage
vcftools_stats.py:373
↓ 1 callersFunctionfilter_min_dist
Filters a VCF to ensure that loci are at least *dist* apart
vcf_parser.py:195
↓ 1 callersFunctionfilter_one_snp
Filters a VCF file so that only one SNP per locus (the first) is retained
vcf_parser.py:93
↓ 1 callersFunctionfilter_random_snp
Filters a VCF file so that only one random SNP per locus is retained.
vcf_parser.py:119
↓ 1 callersFunctionfilter_replicate_vcf
(vcf_input,replicates_input,vcf_output,missing_percentage,error_percentage)
filter_replicates_vcf.py:34
↓ 1 callersFunctionfilter_vcf_chromossmes
Filters the chromossome positions of a vcf_file that are contained in the bad_loci_file. :param vcf_file: string, path to the vcf file
compare_pairs.py:472
↓ 1 callersFunctionget_args
(args)
keep_central_snp.py:21
↓ 1 callersFunctionget_data_from_vcf
Uses the vcf module to parse and retrieve data from a VCF file. The data is returned as a list of lists
vcf2dadi.py:39
↓ 1 callersFunctionget_exp_obs_het
Doc here
BioGenepop.py:24
↓ 1 callersFunctionget_freqs
Gets relative frequencies from VCF data
segregating_loci_finder.py:55
↓ 1 callersFunctionget_list_of_subset
Reads the subset loci from a file and returns a list with it.
strcture_filter.py:20
↓ 1 callersFunctionget_overlap
Takes a list of tuples with SAM file names as first element and their correspoding dictionaries as second element. Returns basic statistics
compare_maps.py:170
↓ 1 callersFunctionget_pops
Returns a dictionary with pop identifier as key and taxa as a list of strings. In the pop file, each populations should be in one line, start
vcf2treemix.py:20
↓ 1 callersFunctionget_sam_sequences
Gets a list of sequences from a SAM file according to a chromosome name and position. It also assumes that reads are 90bp long
vcf2fas.py:14
↓ 1 callersFunctiongff_parser
Parses a GFF file to look for the annotation corresponding to the zone provided in the BLAST data dictionary. Prints the output in the pr
bl_gff_2_annotation.py:37
↓ 1 callersFunctionhtml_creator
(plot_div, output_file)
plot_structure.py:63
↓ 1 callersFunctionintrogressed
:param vcf_file: path to vcf file :param p1: list, taxa to count shared polymorphisms :param p2: list, reference taxa
vcftools_stats.py:396
↓ 1 callersFunctionlist_parser
Parses a file with a loci list (one entry per line). Returns a set with the loci numbers on the list.
loci_consensus.py:72
↓ 1 callersFunctionlist_parser
Parses a list with loci order numbers and returns a set with those values.
VCF_SNP_number_matcher.py:26
↓ 1 callersFunctionloci_parser
Gets a loci list, a .loci file and sequence names and filters the .loci file according to the loci list. Returns a dict {seqname: sequence}
loci2phy.py:41
↓ 1 callersFunctionloci_parser
Parses the .loci file and prints the lines that belong to a loci from the vcf file.
filter_loci_by_vcf.py:31
↓ 1 callersFunctionloci_parser
Gets a loci list, and a loci file and sequence names and filters the loci file according to the loci list. Returns a dict {seqname: sequence}
oldloci2phy.py:41
↓ 1 callersFunctionmain
()
loci_consensus.py:147
↓ 1 callersFunctionmain
()
plot_structure.py:181
↓ 1 callersFunctionmain
()
compare_maps.py:212
↓ 1 callersFunctionmain
()
vcf2treemix.py:91
↓ 1 callersFunctionmain
()
skyline_creator.py:75
↓ 1 callersFunctionmain
()
vcf2dadi.py:101
↓ 1 callersFunctionmain
Handle everything.
filter_loci_by_vcf.py:22
↓ 1 callersFunctionmain
Main function. Runs all the others, based on the given input file name.
singleton_site_remover.py:77
↓ 1 callersFunctionmain
Parses the ".bf" file outputted by Bayenv2 and returns the SNPs with putative associations.
bayenv2_results_miner.py:20
↓ 1 callersFunctionmain
()
vcftools_stats.py:602
↓ 1 callersFunctionmain
()
vcf2bcg.py:113
↓ 1 callersFunctionmain
()
vcf2snapp.py:96
↓ 1 callersFunctionmain
Main function that controls what to do.
vcf_parser.py:228
↓ 1 callersFunctionmain
()
VCF2phy.py:268
↓ 1 callersFunctionmain
Reads a .geste file and changes "1 X" to "2 X 0" for consistency. Prints everything to stdout, so you ight want to use a shell redirect.
correct_geste.py:4
↓ 1 callersFunctionmain
()
compare_pairs.py:500
↓ 1 callersFunctionmain
()
vcf2fas.py:115
↓ 1 callersFunctionmain
Main function. Calls the argparser and the runner function.
outlier_removal.py:162
↓ 1 callersFunctionmain
()
pairwise_ld.py:198
↓ 1 callersFunctionmask_alignment
Parses an alignment in an OrderedDict format {taxon: seq} and returns a similar alignment OrderedDict with the variable positions not present in th
VCF2phy.py:125
↓ 1 callersFunctionmix_overlap
(sam_locations, vcf_locations)
compare_maps.py:110
↓ 1 callersFunctionname_sanitizer
Replaces the full text on the SNP name for something sensible & returns it.
bayenv2_results_miner.py:51
↓ 1 callersFunctionnew_phylip_writer
Transposes the columns back into a phylip file.
singleton_site_remover.py:59
↓ 1 callersFunctionorder_qvals
(qvals, pops)
plot_structure.py:101
↓ 1 callersFunctionparse_associations
Parses an association summary file and return a list with the reported loci.
outlier_removal.py:98
↓ 1 callersFunctionparse_csv
Parses csv file with similar format to the one generated by Tracer Example: time; mean; median; hpd lower 95; hpd upper 95
skyline_creator.py:11
↓ 1 callersFunctionparse_env_vars
Pareses a txt file with one environment variable name per line and returns a list with these values.
bayenv2_results_miner.py:61
↓ 1 callersFunctionparse_geste
Parses a GESTE file and retuns a dict with: {"SNP_num":["FreqAp1\tFreqBp1","FreqAp2\tFreqBp2",...]}.
geste2baypass.py:24
↓ 1 callersFunctionparse_hwe
Parses a hardy-weinberg output file, corrects p-values according to a FDR and generates several plots to visualize the hwe results
vcftools_stats.py:127
↓ 1 callersFunctionparse_loci
Writes a phylip file from a loci file, according to the positions in the VCF. Variable positions that are not present in the VCF are soft masked
VCF2phy.py:159
↓ 1 callersFunctionparse_outliers
Parses an outlier summary file and returns a list with the outlier SNPs.
outlier_removal.py:80
↓ 1 callersFunctionparse_pairs
Parses a txt file in which each line contains three columns with the name of the pair and the replicate names for each pair, which must match
compare_pairs.py:52
↓ 1 callersFunctionparse_pops
Parses a population file and returns a list in which the index of the taxon names correspond to their positions in the qfile
plot_structure.py:52
↓ 1 callersFunctionparse_populations
Parses a population file and returns an orderedDict object with the population name as keys and the corresponding list of samples as values
vcf2dadi.py:22
↓ 1 callersFunctionparse_q
Parses a meanQ file from fastStructure and returns a list of lists, with the values of each taxon in each element of the root list
plot_structure.py:40
↓ 1 callersFunctionparse_sam
Parses a SAM file and retains each mapping location in the genome, along with the coverage. :param sam_file: string, path to SAM file
compare_maps.py:135
↓ 1 callersFunctionparse_sam_mix
(sam_file)
compare_maps.py:90
↓ 1 callersFunctionparse_vcf
Parses the VCF file and returns a dictionary with the loci (chromossomes) as keys and a list of positions as values.
VCF2phy.py:34
↓ 1 callersFunctionparse_vcf
Parses a vcf file and prints only the requested lines (either only neutral or only under selection)
outlier_removal.py:113
↓ 1 callersFunctionparse_vcf
Parses a VCF file and returns a list of genotypes
pairwise_ld.py:24
↓ 1 callersFunctionparse_vcf_variants
Parses the VCF but retains the variation information. This is done when converting a VCF directly to phylip without using a .loci file. The result
VCF2phy.py:81
↓ 1 callersFunctionphy_writer
Writes the output ready to submit to RAxML or other phylogeny programs, along with a partitions file. Based on seqnames dict {seqname: sequenc
loci2phy.py:103
↓ 1 callersFunctionphy_writer
Writes the output ready to submit to RAxML or other phylogeny program. Based on seqnames dict {seqname: sequence}
oldloci2phy.py:92
↓ 1 callersFunctionplot_het
Creates a bar plot for the heterozygous files
vcftools_stats.py:171
↓ 1 callersFunctionplot_multiple_assemblies
This function plots the four error rates for each assembly stats provided by the multi_stats argument. It calculates the mean error for each
compare_pairs.py:370
↓ 1 callersFunctionplot_q
Plots the qvals. If pops are provided, plot them as well
plot_structure.py:114
↓ 1 callersFunctionplot_single_assembly
This function will calculate and plot four error rates from a single assembly (i.e., vcf file). The error rates are: - Total locus error
compare_pairs.py:290
↓ 1 callersFunctionprint_loci
Prints the number of loci in the VCF file
vcftools_stats.py:581
↓ 1 callersFunctionread_phylip
Reads a phylip file and retunrs the data in columns.
singleton_site_remover.py:17
↓ 1 callersFunctionrunner
Manages what gets run and runs it.
outlier_removal.py:139
↓ 1 callersFunctionsegregating_freqs
Defines wether a locus segregates the two groups For now only works with full segregation
segregating_loci_finder.py:79
↓ 1 callersFunctionsingleton_remover
Removes any columns that contain singleton sites. Returns any columns that don't contain sigleton sites.
singleton_site_remover.py:34
↓ 1 callersFunctionsingletons
Parses the singleton/doubleton output file
vcftools_stats.py:222
next →1–100 of 119, ranked by callers