Zhengdeng Lei, PhD

Zhengdeng Lei, PhD

2009 - Present Research Fellow at Duke-NUS, Singapore
2007 - 2009 High Throughput Computational Analyst, Memorial Sloan-Kettering Cancer Center, New York
2003 - 2007 PhD, Bioinformatics, University of Illinois at Chicago

Friday, June 7, 2013

nohup scp ... &


scp as a background process
To execute any linux command in background we use nohup as follows:

$ nohup SOME_COMMAND &
But the problem with scp command is that it prompts for the password (if password authentication is used).
So to make scp execute as a background process do this:

$ nohup scp file_to_copy user@server:/path/to/copy/the/file > nohup.out 2>&1
Then press ctrl + z which will temporarily suspend the command, then enter the command:

$ bg
This will start executing the command in backgroud

Sunday, June 2, 2013

mapping rates from BWA

You can run bamtools stats -in path/to/your/alignments.bam, which will (quickly) report general alignment statistics.
You can also run bamtools filter -isMapped false -in path/to/your/alignments.bam > unmapped.bam (or something quite close to that) to get your unmapped reads.


you can tell from the sam file, by checking the flags, or make the file into a .bam with samtools, and use flagstat from samtools to count.