Hi Peter, Thanks for you quick answer! But I am very new to Galaxy. Could you explain something about those symlinks? Regards, Jaap ________________________________________ From: Peter Cock [p.j.a.cock@googlemail.com] Sent: Wednesday, June 20, 2012 4:01 PM To: Heijden, J.W.F. van der (HG) Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] samtools view region On Wed, Jun 20, 2012 at 2:59 PM, <J.W.F.van_der_Heijden@lumc.nl> wrote:
Hi all,
I was working on the integration of the "samtools view" to work with Galaxy. The idea is to filter an indexed bam file on a chromosome with "samtools view -bh in.bam.bai chr1". After some research I noted that samtools will only execute this command when it can find the corresponding sorted bam file, so the "in.bam".
The problem is that Galaxy renames all the files. So "in.bam" will be for instance dataset_1.dat. When I index the bam file I will get an indexed bam file named dataset_2.dat. Samtools can't detect then that dataset_1.dat is the sorted bam file and dataset_2.dat is the bai file.
Now I was wondering if it is possible to rename files in the ~/galaxy-dist/database/files/000 with a command line. So that dataset_2.dat will be moved to dataset_1.dat.bai.
Does anyone know how to do that?
Kind Regards, Jaap
The simple answer is a wrapper script which makes symlinks for the BAM file and its BAI file using the normal naming conventions. Peter