##############################################################################
#	CTLPScanner
#	Chromothripsis-like patterns detection algorithm
#	input: segmented array data
#	output: chromothripsis-like regions
#	© 2015 Cai Laboratory
##############################################################################


Please follow the below steps to run the script:

1. This script runs on segmented files. Put the name of files that you want to process in “inputlist”.
Here are two examples: “GSM681792,segments.tab” and “GSM681810,segments.tab”.

2. Copy segmented files into the same folder. The file format is as follows:

sample: sample ID
chro: chromosome
start: segment start position
stop: segment stop position
mean: log2 value
probes: number of probes in this segment(optional)

3. Run “CTLP_detection.R”. There are two parameters:

Minimum segment size (default 10Kb): The segment will be ignored if its size is smaller than this value. In our case, we choose 10Kb.
Log2 value between adjacent segments (default 0.3): This parameter is used to filter out “hypersegmented” segments. They are more likely to be segmentation noise. If the log2 signal between two adjacent segments is smaller than this value, no status change is considered. We choose 0.3 for Affymetrix SNP arrays.

4. The script will generate a result file (Results.txt).
In this file, each row represents one chromosome, including information of the window with the highest likelihood ratio.
It contains the following columns:

arrayID
WinNo
WinSize: window size
Chrom: chromosome
Start: window start position
End: window end position
ExpSwitchNo
SwitchNo: calculated status switch number
LR : likelihood ratio
Pvalue

5. Choose the appropriate thresholds to “call” chromothripsis-like patterns.
According to the training set, the default thresholds are: SwitchNo >= 20 and log10(LR) >= 8.
With the included two examples, chromosome 2 of GSM681792 and chromosome 10 of GSM681810 are identified as chromothripsis.
