SAM flags

Each read in a SAM/BAM/CRAM file has a binary flag. I find it very difficult to remember what they mean and build up a flag that does what I need. This site (http://broadinstitute.github.io/picard/explain-flags.html) is very hard to find when I need it, but very useful. It both explain each bit and allow to build the …

Continue reading ‘SAM flags’ »

qsub. Parameters I use often

It is faster if I keep track of the parameters I use when submitting job to arc1. # require 8 hours (required) #$ -l h_rt=08:00:00 # Execute the job from the current working directory (optional, recommended) #$ -cwd # Export all current environment variables to all spawned processes (optional, recommended) #$ -V # require 4 …

Continue reading ‘qsub. Parameters I use often’ »

rsync

rsync has a lot of options I tend to forget. Here a command that works rsync –verbose –progress –stats –times –rsh=”/usr/bin/ssh -c arcfour” –recursive –bwlimit=40000 <origin> <destination> <origin> is the path to one or several files/directory. You can use wildcard characters <destination> is the path to one direcotry or file (if you want to change …

Continue reading ‘rsync’ »

Interactive decripting with gpg

To interactively unencript files (such as those provided by EGA) which have been encripted using a single password with gpg, here how to do it files=`ls *.gpg` for f in $files do qsub -b y -cwd -V -l h_rt=4:00:00 \ gpg -d –no-tty –batch –passphrase-file passFile.txt -o ${f%.gpg} $f done In red the command to …

Continue reading ‘Interactive decripting with gpg’ »

MySQL

Administration First connection as root from localhost mysql -u root Set root password SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘newpwd’) Now you can connect from localhost using mysql -u root -p For security reason, it is better not to allow connection as root from everywhere. Password are stored and communicated encrypted, however SSH is much more …

Continue reading ‘MySQL’ »