Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 2.77 KB

File metadata and controls

37 lines (21 loc) · 2.77 KB

Barcode_analyses-python

Collection of scripts used to study clonal evolution in DNA barcoded, ER+ breast cancer cell line populations

calculate_enrichment_barcodes_z_test.py

calculate_enrichment_barcodes_z_test.py countfile countfile2

This script is used to compare sets of barcodes in different samples/datasets, identify the common ones, and test for differences in barcode representation. The script takes as input 2 tab delimited files. Each file represents a single sample/dataset. Barcodes are organised by row: the ID/barcode sequence is stored in column 2, and the corresponding count is on column 1. For each barcode common between the 2 datasets, the script performs a z test for proportions, testing whether the barcode has a significantly different representation in one dataset compared to the other. The proportion for a barcode is calculated as counts for the barcode divided by the total counts in the dataset.

count_barcodes_in_file.py

count_barcodes_in_file.py barcodefile countfile

This script is used to check for the presence, and extract the counts of, a collection of barcodes. It takes a barcode list and a count file as input (first and second arguments). The barcode list is a txt file listing the ID/barcode sequence, one for each line. The count file is formatted the same way as the input files for calculate_enrichment_barcodes_z_test.py .

calculate_mean_freq_fraction.py

calculate_mean_freq_fraction.py countfile countfile2 countfile3 countfile4 countfile5

This script takes as input 5 barcode count files (same format as above) and calculates the average count across all 5 datasets

filter_starcount_cluster_counts_input_distance.py

filter_starcount_cluster_counts_input_distance.py starcount_cluster countfile [distance] [freq]

This script is used to modify sequence clusters generated by STARCODE. Specifically, it takes as input a threshold for both the edit distance (distance) and sequence count (freq). It then analyses all sequences inside each cluster, determining which ones, if any: 1) have a hamming distance (from the cluster consensus seq) higher than the threshold 2) differ from the consensus by some indel operations, or 3) have a count higher than the threshold. If any of these conditions are met, the sequence is removed from the cluster and will appear as a separate cluster in the output file.

The input arguments are as follows:

starcount_cluster: tab delimited output of starcount clustering algorithm (see also http://www.genomearchitecture.com/starcode)

countfile: tab delimited file with counts stored in column 1 and ids stored in column 2

distance: max hamming distance allowed between a secondary sequence and the cluster reference [default:1]

freq: minimum count for a sequence to be removed from its cluster [default:8]