Noi:Quicklinks

From ZhangLabWiki
Jump to navigation Jump to search

Link to calendar:[[1]]
Some oligos info.

  • AP2V4: 5’- /Phos/TAGCCTCATGCGTATCCGAT-3’
  • DpnII_oligo_v4: 5'-ATGCGTATCCGATC-3'
  • AP2V6: 5’-/5Phos/CACGGGTAGTGTGTATCCTG-3’
  • RE-DpnII-V6: 5’-GTGTATCCTGATC-3’

Install R packages: install.packages("package_name")
SNP 134 data base : on genome-miner: /media/Ext4T/GenomeDB/HsGenome/snp134_snv.txt
genemapster address: nplongth@genemapster.dynamic.ucsd.edu
meangenemachine address: nplongth@132.239.189.236

General unix commands
print the last field of each line
awk '{ print $NF }' file > output

print a certain field to the last field
awk '{substr($0, index($0,$3))}'
this command to print out column #3 to the last field ($0=the whole line)

substitute specific field
awk -F'delimiter' -vOFS='delimiter' '{sub("to_be_replaced", "replaced_with", field_to_be_replaced); print}'
Example: to replace : sign in column1 with tab
awk -F'\t' -vOFS='\t' '{ gsub(":", "\t", $1); print }'

awk command to do matching or searching of string or word "ONLY" 
/\<WORD-TO-SEARCH-HERE\>/

Triton

  • New triton account ssh nplongth@tscc-login.sdsc.edu (May 2013)
Also change job file: #PBS -A k4zhang-group
To submit job file: qsub -q home-k4zhang job_name
  • checkjob -v jobid = job diagnosis
  • gbalance -p zhang-lab = check credit balance of zhang-lab

Unix

  • Kill job by user ID
ps -U USER_ID
kill PID

R plotting

  • Set margin on bottom, left, top, and right of the plot
op <- par(mar=c(6, 6, 4, 2) + 0.1) the number could be optimized
  • Multiple plots on the same axis
plot(x, y1, ylim=range(c(y1,y2)))
par(new=TRUE)
plot(x, y2, ylim=range(c(y1,y2)), axes = FALSE, xlab = "", ylab = "")
  • Example of histogram plot, set log scale on Y-axis --> the plot does'n look really nice. Using gap.plot is much better and the scale look more real.
A=read.table("10%FDR_allCpG-SNP-2MB_mQTL_CpG-SNP_distance2",sep="\t")
head(A)
B=abs(A$V4)/1000
h <- hist(B, breaks=2000, plot=FALSE)
pdf("SNP-CpG_distance_all_CpG.mQTL_log.pdf",height=7.5, width=10)
plot(h$mids, h$counts, log="y", type='h',main="all CpG mQTL", col="#104E8B",lwd=4, ylab="Frequency", xlab="Distance between SNPs and CpG sites (kb)", cex.lab=1.5)
axis(side = 1, at = seq(0,2000,250))

http://search.cpan.org/~callahan/Math-CDF-0.1/CDF.pm
R:Data structure: http://www.statmethods.net/input/datatypes.html
R: Graphic parameters, text & symbol size, plotting symbols, lines, colors, fonts, margins and graph size:http://www.statmethods.net/advgraphs/parameters.html
R: color chart:http://research.stowers-institute.org/efg/R/Color/Chart/ColorChart.pdf
Multiple testing correction: MultipleTestCorrection_Agilent

Dinh:COMPUTATIONAL/bisReadMapper: http://genome-tech.ucsd.edu/LabNotes/index.php/Dinh:COMPUTATIONAL/bisReadMapper
BEDtools and Table browser (to get annotated file)

Group: Genes and Gene Prediction Tracks
Track: RefSeq Genes
Table: RefGenes