Bravo for the journals that assign human-readable informative names to the PDF versions of articles downloaded from their web sites. For example, these naming schemes are very nice:
Hum. Mol. Genet.-2015-Simpkin-3752-63.pdf
PNAS-2005-Storey-12837-42.pdf
Int. J. Epidemiol.-2015-Sharp-1288-304.pdf
Boo for the journals that assign non-informative names to their PDF files. For example, these naming schemes are not informative to me (even though the DOI is part of the name of the first two):
art%3A10.1186%2Fgb-2013-14-5-r42.pdf
art%3A10.1007%2Fs11357-016-9927-9.pdf
ijerph-12-14461.pdf
Dr. Weeks is a Professor of Human Genetics and Biostatistics at the University of Pittsburgh. His research focuses on statistical human genetics in the area of mapping susceptibility loci involved in complex human diseases. The content on this blog is for informational purposes only - use at your own risk!
Friday, October 28, 2016
Tuesday, March 22, 2016
Simple parallelization using 'sem' of the GNU parallel package
If you have a multiprocessor computer, you can easily use the ‘sem’ part of the GNU Parallel system to run processes in parallel.
It was really simple to use and worked as intended. And this was much easier to install and get working than the other approach I was contemplating, which was installing grid engine software.
See:
https://www.gnu.org/software/parallel/sem.html
Below is my parallelized script, which ran a whole set of “HaploPS” commands in parallel using 12 of my processors. I have bolded the two 'sem' commands that made this script execute in parallel.
$ more run_haploPS_parallel.sh
#!/bin/bash
for (( chr=1;chr<=22;chr=chr+1)) {
cd $chr
for (( i=95 ; i>=5 ; i=i-5)) {
freq=$(echo "scale=2;$i/100"|bc)
date
echo "Starting HaploPS run on chromosome " $chr " with freq = " $freq
sem -j12 HaploPS -geno selscan.hap -legend selscan.map -freq 0$freq -out ../haploPS/haploPS_0${freq}_chr${chr}.txt
echo "Run completed."
date
}
cd ..
}
sem --wait
##############It will automatically run haploPS at 5 to 95 percent frequencies.
#################################################################
Tuesday, August 18, 2015
The difference between mathematics and statistics
"Mathematics is about whether the conclusions follow from the assumptions. By contrast, statistics is about whether the assumptions have anything to do with the real world."
Jay Kadane, Leonard J. Savage Professor of Statistics, Emeritus, Carnegie-Mellon University
Jay Kadane, Leonard J. Savage Professor of Statistics, Emeritus, Carnegie-Mellon University
Monday, February 23, 2015
rsync
As part of transitioning from using an old desktop to a new desktop (while both are still active), I found the 'rsync' command to be very useful. Here is the options I ended up using to accomplish my goal of copying over (old) files from the old machine to the new without wiping out any new files on the new machine:
rsync -avzuhP --log-file=/destination/dir/rsync_log.txt -e ssh remoteuser@remotehost:/source/dir /destination/dir/
Here's what the options do:
-a archive
-v verbose
-z compress
-u update <= Do Not Overwrite the Modified Files at the Destination
-h human-readable
-P progress bar/partial transfers
Note that these options are turned on in '-a' archive mode:
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-p, --perms preserve permissions
-t, --times preserve times
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-D same as --devices --specials
rsync -avzuhP --log-file=/destination/dir/rsync_log.txt -e ssh remoteuser@remotehost:/source/dir /destination/dir/
Here's what the options do:
-a archive
-v verbose
-z compress
-u update <= Do Not Overwrite the Modified Files at the Destination
-h human-readable
-P progress bar/partial transfers
Note that these options are turned on in '-a' archive mode:
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-p, --perms preserve permissions
-t, --times preserve times
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-D same as --devices --specials
Thursday, August 28, 2014
Hiding 'answer' slides in student handouts using Beamer
After adding 'Question' slides, followed by 'Answer' slides, to my Beamer presentation, I wondered if there was an easy way to remove the 'Answer' slides from the handout version of the slides that I will give to the students.
It turns out that there is, as described in this link: just add <handout:0> right after the \begin{frame}
When 'handout' is added to the document class, all those slides marked with <handout:0> are automatically excluded.
This is wonderful!
It turns out that there is, as described in this link: just add <handout:0> right after the \begin{frame}
When 'handout' is added to the document class, all those slides marked with <handout:0> are automatically excluded.
This is wonderful!
Monday, June 16, 2014
The wonderful 'endfloat' LaTeX package
With LaTeX (or LyX), one can work on a manuscript while placing the tables and figures in their natural places, and then, with the addition of a single line to the preamble:
\usepackage[nolists,tablesfirst]{endfloat}
the tables and figures are magically moved to the end, as is required at submission by many journals.
The 'endfloat' package even inserts markers like "[Table 1 about here]" in the main text.
Now I just need to persuade my colleagues to start writing their manuscripts in LaTeX...
Thursday, April 10, 2014
Here is an amazing set of photographs of C.C. Li, who was the founder of the Division of Human Genetics within the Department of Biostatistics at the University of Pittsburgh.
Subscribe to:
Posts (Atom)
