Sikhi Langar (Free food and passion)
Source: vimeo.com
Halo of Rainbow by Steven Morgana
Using curved neon light tubes and mirrors, Steve is able to produce a mind-melting illusion with this floating circle of rainbow-y ghostliness.
(via: mymodernmet)
Amazing
(via proofmathisbeautiful)
Source: ianbrooks
Marketing Campaign of the Day: A bicyclist in a sleepy Belgian town couldn’t resist when a giant red button caught his attention — it was just asking to be pushed. The dramatic fallout became TNT’s new ad spot in the country.
[reddit]
(via lost-count-at-infinity)
Source: thedailywhat
Source: biofeedMany of you might have observed a problem with the removal of the files having a special characters in them. For instance, $1.txt, -bg etc.
# removing $1.txt
rm \$1.txt
# if its the only one file
rm *.txt
# removing -bg, its a little tricky as - denotes the parameter input for rm. So, from…
Hola!
Copying left over files and merging is really easy via GUI (graphical user interface) but when it comes to command line, transferring big files or copying fast or usage of script, I always lacked a tool to resume the copy, when it stops or fails in between.
The tool in ‘rsync’, It was developed in 1996 but still we are ignorant about it.
Quickly using rsync to resume copy:
rsync -a - -progress source/folder/ destination
* Note the slashes, if you want to copy left over items from one folder to another, the folder should be present in the destination dir with the same name as in the source. So, in this case, a folder named ‘folder’ is present in the destination dir. and the copy will resume with left over files.
’- - progress’ is really nice, and will tell you what the tool is copying at the moment.
Have Fun
Sukhi
Leute!!
Suppose you have a list of 20 dataframes, each of data frame has 10 columns but different rows. You want to know the length of rows in each dataframe without using loop in a single line.
sapply(x,function(y)length(y[[1]]))
where x is a list
If you are after a specific column, just replace the number [[1]] with it.
Cheers
Sukhi
Hola people!
Quick tutorial on how to convert bam file to bedGraph (different from bed files) for displaying them into UCSC browser. We will convert them to bigwig (bw), which are more portable, encrypted and less space consuming data formats.
Step 1: using a combination of ‘samtools’ and ‘bedtools’ and ofcourse ‘shell pipe’
samtools view -b file.bam | genomeCoverageBed -ibam stdin -bg -g genomeIndex/mm9.chrom > file.bedGraph &
input file = file.bam; output = file.bedGraph
genomeIndex = mm9.chrom (to get the genome index, which a text file containing the mouse genome size per chromosome, use fetchChromSizes, get it from UCSC ftp http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/fetchChromSizes)
Step2 : sort obtained bedGraph file chromosome wise using sort
sort -k1,1 -k2,2n file.bedGraph > file.bedGraph.sorted
Step 2: converting bedGraph to bigwig
using bedGraphToBigWig utility from UCSC tools (http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedGraphToBigWig)
bedGraphToBigWig file.bedGraph.sorted genomeIndex/mm9.chrom file.bw
I will make another post, how to use ‘bw’ (bigwig) files for viewing them on server using a https link and sharing a url.
Any problems, please comment, I will try to answer.
Cheers
Sukhdeep Singh
Max Planck Society