Monday, January 21, 2013

Beware not to overwrite output files of Cuffdiff by mistake

I have set Cuffdiff to process several files with the following command:

C02HQ105DHJQ:Lluis - EB project mpjanic$ cuffdiff merged_asm/merged.gtf -o diff_out -b genome.fa -p 2 --no-diff --labels 4_BMI1_3604_ACAGTG,4_DCAF7_3605_GTGAAA,4_EED_3610_ACTGAT,4_MEL18_3602_GCCAAT,4_PCGF5_3603_CTTGTA,4_RING1B_3606_GTCCGC,5_CBX7_3612_CTTGTA,5_CTR_3611_GCCAAT,ES-CBX7_3559_CTTGTA,ES-CTR_3558_GCCAAT,ES-MEL18_3561_GTCCGC -u \
> ./4_BMI1_3604_ACAGTG/accepted_hits.bam \
> ./4_DCAF7_3605_GTGAAA/accepted_hits.bam \
> ./4_EED_3610_ACTGAT/accepted_hits.bam  \
> ./4_MEL18_3602_GCCAAT/accepted_hits.bam \
> ./4_PCGF5_3603_CTTGTA/accepted_hits.bam \
> ./4_RING1B_3606_GTCCGC/accepted_hits.bam \
> ./5_CBX7_3612_CTTGTA/accepted_hits.bam \
> ./5_CTR_3611_GCCAAT/accepted_hits.bam \
> ./ES-CBX7_3559_CTTGTA/accepted_hits.bam \
> ./ES-CTR_3558_GCCAAT/accepted_hits.bam \
> ./ES-MEL18_3561_GTCCGC/accepted_hits.bam


After the extensive run has finished I have noticed the output files were empty:

C02HQ105DHJQ:diff_out mpjanic$ ls -li
total 0
2605038 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 cds.count_tracking
2605031 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 cds.diff
2605034 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 cds.fpkm_tracking
2605042 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 cds.read_group_tracking
2605028 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 cds_exp.diff
2605027 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 gene_exp.diff
2605039 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 genes.count_tracking
2605035 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 genes.fpkm_tracking
2605043 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 genes.read_group_tracking
2605025 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 isoform_exp.diff
2605036 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 isoforms.count_tracking
2605032 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 isoforms.fpkm_tracking
2605040 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 isoforms.read_group_tracking
2605030 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 promoters.diff
2605044 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 read_groups.info
2605045 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 run.info
2605029 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 splicing.diff
2605026 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 tss_group_exp.diff
2605037 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 tss_groups.count_tracking
2605033 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 tss_groups.fpkm_tracking
2605041 -rw-r--r--  1 mpjanic  staff  0 Jan 21 03:07 tss_groups.read_group_tracking



I have noticed that after the run was finished by mistake this command was executed (most probably by me typing the Up arrow and [, followed by Enter):

C02HQ105DHJQ:Lluis - EB project mpjanic$ cuffdiff merged_asm/merged.gtf -o diff_out -b genome.fa -p 2 --no-diff --labels 4_BMI1_3604_ACAGTG,4_DCAF7_3605_GTGAAA,4_EED_3610_ACTGAT,4_MEL18_3602_GCCAAT,4_PCGF5_3603_CTTGTA,4_RING1B_3606_GTCCGC,5_CBX7_3612_CTTGTA,5_CTR_3611_GCCAAT,ES-CBX7_3559_CTTGTA,ES-CTR_3558_GCCAAT,ES-MEL18_3561_GTCCGC -u ./4_BMI1_3604_ACAGTG/accepted_hits.bam ./4_DCAF7_3605_GTGAAA/accepted_hits.bam ./4_EED_3610_ACTGAT/accepted_hits.bam  ./4_MEL18_3602_GCCAAT/accepted_hits.bam ./4_PCGF5_3603_CTTGTA/accepted_hits.bam ./4_RING1B_3606_GTCCGC/accepted_hits.bam ./5_CBX7_3612_CTTGTA/accepted_hits.bam ./5_CTR_3611_GCCAAT/accepted_hits.bam ./ES-CBX7_3559_CTTGTA/accepted_hits.bam ./ES-CTR_3558_GCCAAT/accepted_hits.bam ./ES-MEL18_3561_GTCCGC/accepted_hits.bam[
You are using Cufflinks v2.0.2, which is the most recent release.
open: No such file or directory
File ./ES-MEL18_3561_GTCCGC/accepted_hits.bam[ doesn't appear to be a valid BAM file, trying SAM...
Error: cannot open alignment file ./ES-MEL18_3561_GTCCGC/accepted_hits.bam[ for reading


This has overwritten the output files. I have checked this by modifing gene_exp.diff file to contain 5 bytes and then running this comand again and after this the file contained again 0 bytes.

So be careful not to touch the arrows when executing Cuffdiff or any similar tool in Unix.

No comments:

Post a Comment