2011-Fairclothetal-SysBiol-Notes (original) (raw)

@brantfaircloth

Clone this repository at <script src="https://gist.github.com/brantfaircloth/47e03463db0573c4252f.js"></script>

Save brantfaircloth/47e03463db0573c4252f to your computer and use it in GitHub Desktop.

2011-Fairclothetal-SysBiol-Notes

Identifying UCEs in other organisms


5599 * get distance btw. UCE loci in set above w/:
python other-organisms/get_distances_in_chicken.py * create a new table in the probe dbase for the ids and count of all "conservation" sureselect probes:
sqlite> create table sureselect_all_probe_counts as select seq, id, count(seq) as cnt,
sqlite> data_source from sureselect where data_source = 'conservation' group by seq order by id;
sqlite> select count() from sureselect_all_probe_source;
count(
)

5138

Primate tree test

python share/get_fake_velvet_contigs_from_genomes.py \
/Users/bcf/Dropbox/Research/faircloth/UCEs-as-genetic-markers/data/primates/lastz/all-probes-to-papHam1.lastz \
/Volumes/Data/Genomes/papHam1/papHam1.2bit \
--dupefile /Users/bcf/Dropbox/Research/faircloth/UCEs-as-genetic-markers/data/probes/all-to-all.lastz \
--fasta /Users/bcf/Dropbox/Research/faircloth/UCEs-as-genetic-markers/data/primates/fake-velvet-fasta/papHam1-150.fasta \
--flank 150 --splitchar None

this gives U-shaped figure

primates = read.table('/Users/bcf/Dropbox/Research/faircloth/UCEs-as-genetic-markers/data/primates/stats/primate-trimmed-align-stats.csv',header=TRUE, sep = ',')
nobase = primates[primates$greaterthanonediff >0.0,]
nooutlier = nobase[nobase$greaterthanonediff <= 0.10,]
ggplot(nooutlier, aes(x=bp,y=greaterthanonediff,color=greaterthanonediff)) geom_point(size=3) scale_colour_gradientn(colour = rainbow(5)) scale_y_continuous('Frequency of variant bases\n') scale_x_continuous('\nDistance from center of alignment') theme_bw() opts(legend.position = "none")
pdf('name.pdf')

remove some gridlines

p
g = ggplotGrob(p)
grid.ls(g)
grid.remove(gPath("GRID.gTree","layout","panel","grill.gTree","panel.grid.major.y.polyline"),grep=T)
grid.remove(gPath("GRID.gTree","layout","panel","grill.gTree","panel.grid.minor.y.polyline"),grep=T)
dev.off()

Bird deep tree from in vitro data

this gives U-shaped figure

birds = read.table('/Users/bcf/Dropbox/Research/faircloth/UCEs-as-genetic-markers/data/birds/stats/bird-trimmed-align-stats.csv', header = TRUE, sep = ',')
birdnobase = birds[birds$greaterthanonediff >0.0,]
birdnooutlier = birdnobase[birdnobase$greaterthanonediff <= 0.10,]
ggplot(birdnooutlier, aes(x=bp,y=greaterthanonediff,color=greaterthanonediff)) geom_point(size=3, alpha = 5/10) scale_colour_gradient(low = "red", high = "blue") scale_y_continuous('Frequency of variable positions\n') scale_x_continuous('\nDistance from center of alignment') theme_bw() opts(legend.position = "none")
pdf('bird-variable-positions.pdf')

remove some gridlines

p
g = ggplotGrob(p)
grid.ls(g)
grid.remove(gPath("GRID.gTree","layout","panel","grill.gTree","panel.grid.major.y.polyline"),grep=T)
grid.remove(gPath("GRID.gTree","layout","panel","grill.gTree","panel.grid.minor.y.polyline"),grep=T)
dev.off()

Enrichment stats (for birds)

Additional SNP Analyses

Plotting additional figures

add pos column

raw$pos = raw$snp.start - (raw$uce.start raw$uce.end)/2

UCE Capture Data Figures