This is a test version of Biostars. For the public version, visit https://www.biostars.org.
about computer memory and mpileup files

Dear all,

I am using Varscan2 in order to call the somatic variants in the cancer genomes.

Please could you advise whether you know a way to keep a file in the computer memory for the next processing step, instead of writing it to hard drive ?

More specifically, for Varscan2, I would like to keep the germline and tumor mpileup files in the computer memory for the next processings steps (ie variant calling), instead of writing them on the disk.

thanks,

bogdan

snp memory varscan2

2 answers

If you are on Linux/Mac system, you should be able to use the Pipe symbol "|" to redirect the output of one command into the input of the next command.

On the VarScan website it has instructions: http://varscan.sourceforge.net/using-varscan.html

Note, to save disk space and file I/O, you can redirect mpileup output directly to VarScan with a "pipe" command. For example: One sample:

samtools mpileup -f reference.fasta myData.bam | java -jar VarScan.v2.2.jar pileup2snp

Multiple samples:

samtools mpileup -f reference.fasta sample1.bam sample2.bam | java -jar VarScan.v2.2.jar pileup2snp

Thank you, Tonor ! And for both GERMLINE and TUMOR samples ... how would you write ?

You might look into using a "ramdisk". Many UNIX systems I have used have a predefined ramdisk on /dev/shm. You can copy files there and use them normally.

A RAM disk is a region of memory that you can use like a normal filesystem or harddrive. If one is not made yet, some commands will make one for you. If your system has plenty of memory, it is a good idea to create one and use it for temporary files. Windows can probably do it with a utility too.

Beware that it erases everything when you reboot!

Thank you Karl, great suggestion !

Log in to answer this question.