Ivan's essential bookmarks


Contact me at: ivangreg at yahoo co uk

Search engines

Google - Advanced Search
Google - Linux pages
Google - Send text to phone
Freeality Email Addresses and Reverse Lookup
Cingular wireless Free2Go

Email_resources

YahooMail
Notre Dame Webmail
Google Mail
NIH Webmail
Mail2Web

Career links

Bioinformatics (the journal)
Sciencemag Carrers
Nature Jobs
St. Jude Children's Research Hospital
Opportunities for postdocs at the ASCB
Some academic Bioinformatics and Computational Biology programs

Latex Resources

Comprehensive TeX Archive Network
The Indian TeX Users Group
The LaTeX Font Catalogue
Difference between latex and pdflatex
Converting bitmaps to eps (for latex)

Programming

Vim documentation
Vim Reference guide
Some of the most often used Vim commands
C programming notes
C course at The University of Nijmegen
C course at The University of Strathclyde
Programming in C (a reference website)
The GNU C Library
C++ resources at Linux Self Help
Allocating vectors and arrays in C++
Sample programs with multi-dimensional vectors in C++
Bash Shell Programming in Linux
Advanced Bash Shell Programming in Linux (Scroll down to get to the link. Awesome site.)
Practical UNIX & Internet Security
UNIX Shell Script Tutorials & Resources
Differences between the different unix shells
Perl: passing arguments from the command line (by Jon Allen).

Math

Advanced engineering Mathematics
Autoregressive (Integrated) Moving Average Models -AR(I)MA-

Scientific Artwork

Imagemagick: usage by example
Xmgrace: plotting bar graphs
Gnuplot
LabPlot
Scilab

Arts (general)

The Art Institute of Chicago Museum
The Snite Museum of Art
RadioBlue 100.7 FM

Cine

KelloggInstitute
NotreDame: Film screenings.
ISSA Film Series
Hollywood.com

Performing arts

SouthBend Symphony Orchestra
Notre Dame Concert Goers site
Lyric Opera of Chicago
Classical Live Online Radio Webcast - Classical Music.

Brain unrusters

ZNet,Independent news and opinion publishers.
LaNacion
The Globe and Mail
Le Monde diplomatique
The New York Times

Fax

HotCorp
TPC.INT:Send a fax

MolecularBiology

NCBI Home Page
NCBI Bookshelf
Sanger Institute
Blastsearch
Blast Mouse Traces
Blast The Mouse Genome
COILS Server
Primer3 Input (primer3_www.cgi v 0.2)
WebLogo
A very nice way to display consensus in multiple alignments
BAMBE at France
Bayesian inference of phylogeny
MrBayes at UK
Bayesian inference of phylogeny using MCMC
Phylip at France
Felsenstein programs. (recommended)
Phylip at Singapore
Felsenstein programs
Box Shade at Switzerland
(recommended)
Box Shade at France
READSEQ Sequence Conversion Service
Fix corrupt msf files
Pedro's BioMolecular Research Tools - Part 1

Cell biology and histology

Image and Video Library
Allen Brain Atlas

Genomic scale projects

GermOnline
The Sanger Centre: Sequencing Projects
Genome Net WWW server

Dictionaries, Encyclopoedias and Libraries

Journal Club assignment

Nature
EMBO
Journal of Molecular Evolution
Molecular and Cellular Biology
EncyclopaediaBritannicaOnline
xrefer
Medicus Abbreviations
Compendio de abreviaciones incluyendo nombres de journals.
The World Electronic Text Library
yourDictionary.com
Kaplan Medical

Useful Linux commands

Is there any text file with 480 lines in this directory?
    wc *.txt | grep 480

How many tif files I have in this directory? (imagine that you have 30000 tifs and ls can't handle that many arguments)
    ls -l | grep '\.tif' | wc -l

Yeah... I did it with awk but I can't remember exactly how...
    history | grep awk

Archiving (and moving) files
    tar -cvf - *.txt --exclude unwantedfile.txt --remove-files | gzip -v9 > archive.tar.gz
What's the content of that archive?
    unzip -v archive.zip
    tar -tvf archive.tar
    tar -tvzf archive.tar.gz
or in a longer fashion
    gunzip < archive.tar.gz | tar -tvf -
Unpacking a specific file from the archive
    gunzip < archive.tar.gz | tar -xvf - file.txt
    unzip archive.zip -xv innerfile.txt

Creating a CD or DVD image from the content of a directory
    mkisofs -r -J -o ./myimage.iso /mydirectory/
Creating a CD or DVD image from a CD or DVD (clonning)
    dd if=/dev/cdrom of=myimage.iso bs=2048
DVD burning
    dvdrecord -v -dao speed=4 dev=0,0,0 dvd.iso

Show every other line
    awk '(NR%2==0) {print $0; }' input.txt
Calculate the average of the values in the first column of data
    awk '{sum += $1}; END {print sum/NR}' input.txt
How many lines with the second and fourth columns equal to 5.3 I have in this matrix?
    awk '($2==5.3 && $4==5.3) {print $0; }' matrix.txt | wc -l
How many lines in this matrix do not have 7 columns?
    awk '(NF!=7) {print $0; }' matrix.txt | wc -l
Now a nice perl one-liner that works like awk. It prints the second and fifth column if the first column value is 'somestring'
    cat mytable.txt | perl -lane 'print "@F[1,4]" if @F[0] eq 'somestring''
And since we are into perl one-liners, here is another one
    echo 'censorship' | perl -wlane 'while (length($F[0]) > 0) {print $F[0]; chop $F[0];}'
Somebody stop me!! I can't stop writing one-liners!!
    echo 'undone' | perl -wlane 'print @F; $F[0] =~ s/^un//; print @F'
Counting the number of elements per line
    perl -wlane 'print $#F+1' mytable.txt
Counting the number of elements per line, skipping the first line
    perl -wlane 'next if $. == 1; print $#F+1' mytable.txt

Checking printers and printer jobs
lpstat -a or lpq or lpc (...and then status -it may require superuser atributes)
Sending a printing job
    lpr -P ChemOfficeColor3700 -o sides=two-sided-long-edge -o page-ranges=1-4,7,8 postscriptfile.ps
To cancel a printing job in a particular printer, first find the printing job number (say 12345) and then delete it as in this example
    lpq -P ChemOfficeColor3700     lprm -P ChemOfficeColor3700 12345

Sorting a table first on the second column and then on the fisrt
    sort -k 2,2 -k 1,1 table.txt
if the second column has to be ordered by numeric value use
    sort -k 2n,2 -k 1,1 table.txt
if the numbers are in scientific notation it is better to use a less efficient but more robust option
    sort -k 2g,2 -k 1,1 table.txt
The sort command can accept pipes with the dash, ie
    awk '{print $0; }' table.txt | sort -k 2g,2 -k 1,1 -

Finding recursively all directories beginning with M:
    find -type d -name 'M*'
Finding all pdfs recursivelly but excluding the EXCLUDEME directory
    find -path './EXCLUDEME' -prune -o -name '*.pdf'

Finding a file by its content:
    grep 'John Smith' *.txt
same thing but with color highlighting
    grep --colour 'John Smith' *.txt
Recursive grep: find all .txt files containing the string John Smith. (Recursive grep can ONLY be done by combination of find and grep. For more info type info grep)
    find . -name '*.txt' | xargs grep 'John Smith' /dev/null
If the output of find contains spaces, grep will not understand it. That can be fixed changing the spaces to "backslash spaces" globally
    find . -name '*.txt' | sed 's/ /\\ /g' | xargs grep 'John Smith' /dev/null
Note: the line above is worth as an illustration of double piping but the robust way of passing arguments from find to xargs is this
    find . -print0 -name '*.txt' | xargs -0 grep 'John Smith' /dev/null
A nice case would be the combination of these last cases, like this
    find -path './YESTRDAY' -prune -o -name '*.txt' | sed 's/ /\\ /g' | xargs grep --colour 'John Smith' /dev/null

Checking partition space and AFS quota respectivelly
    df -hk
    fs lq ~

How much space are pdf files using in my current directory?
    du --block-size=1K *.pdf | awk '{sum += $1}; END {print sum}'
    find . -name '*.pdf' | xargs du -c

How is the volume of my data distributed among directories?
    du --block-size=1K ~ | sort -k 1n,1 -
now the same thing including files, reporting in MBites and excluding the directory YESTRDAY,
    du -a --block-size=1M --exclude=YESTRDAY ~ | sort -k 1n,1 -
and now a variation: listing recursivelly all pdf files ordered by size
    find -path './YESTRDAY' -prune -o -name '*.pdf' -ls | awk '{print $7, $11; }' | sort -k 1n,1 -

Creating a 1000kB file
    dd if=/dev/zero of=./testfile bs=1024 count=1000

Is LaTeX installed in this computer?
    rpm -qa | grep latex

Is Firefox locked up? Then unlock it like this
    rm -vf ~/.mozilla/firefox/*.default/.parentlock

Changing file atributes with chmod. There are three user levels, u(user), g(group) and o(other). There are three types of access: r, w and x. For instance, to block read access to the group
    chmod g-r fileordirectory
and to grant executable access to the owner
    chmod u+x fileordirectory
Important to note: attributes do not work the same straightforward way for directories and files. For directories, the x attribute grants access to it.

Breaking up a single line of xml code into one record per line. This is an example to clean a B3 database file
    sed -e 's/<\/Book>/<\/Book>\n/g' -e 's/<\/Article>/<\/Article>\n/g' -e 's/<\/Misc>/<\/Misc>\n/g' dbin.xml > dbout.xml
Cleaning up the double bracket in the "Title" field in of the bitex export of B3
    sed -e 's/^\tTitle = {{/\tTitle = { /' -e 's/}},$/ },/' dbin.bib > dbout.bib

vim and regular expressions. Grouping and backreferences. An example with search and replace. To match "good anyword" and make it "better anyword" in the current line, do
    :s/good \(.\)/better \1/

Loops in awk, by example. Task: to write a list of numbers from 1 to 10. Solution with while: write to file.awk the following code
    BEGIN {}
    {}
    END {
        x = 1 # this line could instead be inserted in the BEGIN block
        while (x <= 20) {
            print x
            x += 1
        }
   }

And now a solution with for:
    BEGIN {}
    {}
    END {
        for (x=1; x <= 20; x++) {
            print x
        }
   }
and then run it as awk -f file.awk.

Changing image colors with convert. This example shows how to change the blue channel into the red channel.
    convert input.gif \( +clone -channel B fx R \) +swap -channel R -fx v.B output.gif
Actually, what that has done is swap the Red and Blue channels. If you want to change a specific blue (say 0,0,239) into a specific red (say 255,0,0), this this is the way
    convert input.gif -fill "rgb(255,0,0)" -opaque "rgb(0,0,239)" output.gif
and to modify the color of all the gif files in the current directory, we must use mogrity rather than convert
    mogrify -fill "rgb(255,0,0)" -opaque "rgb(0,0,239)" *.gif
Note: use with caution. mogrify overwrites the original files.

Matlab

Running Matlab in command line mode
    matlab -nosplash -nodesktop -nodisplay -nojvm
Running Matlab in non-interactive mode. Assuming that the code is in the file mycode.m, the syntax is
    matlab -nosplash -nodesktop -nodisplay -nojvm -r mycode
Example of how to generate and save a figure in non-graphical environment. Launch Matlab in command line mode and type
    X = [0:0.1:7];
    figure; close
    plot(X,sin(X));
    print(gcf, '-depsc2', 'myfigure.eps');

Blah...