1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
## we delete all files we don't need in this directory. Be careful in case users try running it somewhere else, outside this dir.
chdir $FindBin::RealBin or die "error, cannot cd to $FindBin::RealBin";
my @files_to_keep = qw (cleanme.pl
README
reads.left.fq.gz
reads.right.fq.gz
runMe.sh
__indiv_ex_sample_derived
misc_run_tests
run_abundance_estimation_procedure.sh
reads2.left.fq.gz
reads2.right.fq.gz
longReads.fa
Makefile
test_FL.sh
reads.left.fa.gz
reads.right.fa.gz
samples.SE.txt
samples.PE.txt
);
my %keep = map { + $_ => 1 } @files_to_keep;
`rm -rf ./trinity_out_dir` if (-d "trinity_out_dir");
`rm -rf ./bowtie_out` if (-d "bowtie_out");
`rm -rf ./RSEM.stat` if (-d "RSEM.stat");
`rm -rf ./trinity_single_outdir` if (-d "trinity_single_outdir");
`rm -rf ./bowtie_single_outdir` if (-d "bowtie_single_outdir");
`rm -rf ./normalized_reads_test` if (-d "normalized_reads_test");
`rm -rf ./collectl` if (-d "collectl");
`rm -rf ./trin_w_jaccard` if (-d "trin_w_jaccard");
`rm -rf ./trin_SE_outdir` if (-d "trin_SE_outdir");
`rm -rf ./trin_test_no_qtrim`;
`rm -rf ./trinity_test_no_qtrim` if (-d "trinity_test_no_qtrim");
`rm -rf ./trinity_w_jaccard` if (-d "trinity_w_jaccard");
`rm -rf ./__test_trinity*`;
`rm -rf ./trinity_trim_and_norm_outdir`;
`rm -rf ./RSEM_outdir`;
`rm -rf ./eXpress_outdir`;
`rm -rf ./eXpress_PE`;
`rm -rf ./kallisto_PE`;
`rm -rf ./RSEM_PE`;
`rm -rf ./test_trinity_long_reads`;
`rm -rf ./test_trinity_bowtie2`;
`rm -rf ./trinity_test_samples_SE`;
`rm -rf ./trinity_test_samples_PE`;
`rm -rf ./trinity_out_dir_monitored`;
`rm -rf ./trinity_piecemeal`;
`rm -rf ./trinity_test_samples_PE_min_kmer_cov_3`;
`rm -rf ./trinity_complete`;
foreach my $file (<*>) {
if (! $keep{$file}) {
print STDERR "-removing file: $file\n";
unlink($file);
}
}
exit(0);
|