This is a personal web, my notes on bioinformatics. The public part contains intro to flow cytometry, principle of protein array platform and tips on how to start with R programming language.
The new ones are here.
25.03.2015
(http://www.nature.com/collections/qghhqm/pointsofsignificance)
23.07.2014
Bitbucket does not have any repository related statistics.
The way around it is gitstats.
In Ubuntu install with:sudo apt-get install gitstats
.
And run as:gitstats /home/bioinformin/exomeMPS/ /home/bioinformin/exomeMPS_stats
firefox /home/bioinformin/exomeMPS_stats/index.html
03.07.2014
I made R packege to annotate ggplot2 boxplots with significance clips and text. It lives at sigAnnotateBoxplots Bitbucket repository.
09.06.2014
history
… history of shell commands
<Ctrl+R>
–> search_term –> <Enter>
… search history and execute
<Ctrl+R>
–> search_term –> <Right Arrow>
… search history and edit command
05.06.2014
<ESC>
… get to COMMAND mode
i
… get to INSERT mode (for editing)
:w
… write (=save) (in COMMAND mode)
:x
… save and exit (in COMMAND mode)
:q
… quit (it won't let you if changes not saved) (in COMMAND mode)
:q!
… quit discarding changes (you will not be prompted if changes not saved) (in COMMAND mode)
03.01.2014
I have updated linux tips with these:
find . -name "._*" -type f -delete
… find and delete files starting “._” recursively in a current folder
find . ! -name "*.txt" -type f
… inverse find (all files not ending “.txt”)
ls -laFR
… list files recursively (with folders contents)
10.10.2013
For ASCII printable characters look at e.g. Wikipedia entry
# generate random 'DNA sequence':
set.seed(1234)
dna_seq <- paste(replicate(20, sample(c("A", "T", "G", "C"), 1)), sep = "",
collapse = "")
# generate random Phred quality scores:
set.seed(1234)
dna_qual_num <- replicate(20, sample(5:45, 1)) # numeric values
dna_qual_chr <- rawToChar(as.raw(dna_qual_num + 64)) # ad 64 for Phred+64 flavor
# print FASTQ:
cat("@SEQ_ID\n", dna_seq, "\n+\n", dna_qual_chr, sep = "")
## @SEQ_ID
## AGGGCGAAGGGGTCTCTTAA
## +
## I^]^h_EN`Za[PjPgPOLN
It takes more space to write numbers for quality values compared to ASCII characters:
cat(paste(dna_qual_num, sep = "", collapse = ","), "\n", dna_qual_chr, sep = "")
## 9,30,29,30,40,31,5,14,32,26,33,27,16,42,16,39,16,15,12,14
## I^]^h_EN`Za[PjPgPOLN
26.09.2013
I wanted a way to generate bits of a html without writing html tags. Some sort of markdown would serve this well. It should work as mini redaction system. This is how I have done that:
sed
to extract the <body>
part of the html and save it into plain text file. So when markdown is knitted the text file is also
generated.include
command to the web page which should
include this html “chunk”.That's it.
Step-by-step
bloq_post.Rmd
file in Rstudiobloq_post.Rmd
is knitted):
setwd("/path/to/your/blog_post") # set working directory
system("sed -e '1,/<body>/d' -e'/^<\\/body>/,$d' bloq_post.html > bloq_post.txt") # extract body part of the html
bloq_post.Rmd
to get bloq_post.html
and also bloq_post.txt
bloq_post.txt
on your web server.bloq_post.txt
included (e.g. index.php
) put something like:
<?php $INC_DIR = $_SERVER["DOCUMENT_ROOT"]. "/www/"; include ($INC_DIR. "blog/bloq_post.txt"); ?>
Notes
The <body>
part of html extraction with sed
was stolen from
Jeromy Anglim
(and adapted to exclude the <body>
tag itself).
The markdown needs to be knitted twice (first round does not have the html with changes yet).
The bloq_post.txt
can be also shared via Dropbox so no ftp is needed.