-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more information about SNP filtering and processing to the manual
- Loading branch information
FelixKrueger
committed
Jul 18, 2016
1 parent
10bf621
commit 93d5b81
Showing
3 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/perl | ||
use warnings; | ||
use strict; | ||
use File::Copy "cp"; | ||
|
||
my $dir = shift@ARGV; | ||
|
||
die "Please provide a directory to copy files to!\n\n" unless ($dir); | ||
|
||
unless (-d $dir){ | ||
warn "Specified directory '$dir' doesn't exist. Creating it for you...\n\n"; | ||
mkdir $dir or die "Failed to create directory: $!\n\n"; | ||
} | ||
|
||
my @files = ('RELEASE_NOTES.txt','SNPsplit','tag2sort','SNPsplit_User_Guide.pdf','license.txt','SNPsplit_genome_preparation'); | ||
|
||
foreach my $file (@files){ | ||
copy_and_warn($file); | ||
} | ||
|
||
sub copy_and_warn{ | ||
my $file = shift; | ||
warn "Now copying '$file' to $dir\n"; | ||
cp($file,"$dir/") or die "Copy failed: $!"; | ||
|
||
} | ||
|
||
@files = ('SNPsplit','tag2sort','SNPsplit_genome_preparation'); | ||
|
||
foreach my $file (@files){ | ||
set_permissions($file); | ||
} | ||
|
||
sub set_permissions{ | ||
my $file = shift; | ||
warn "Setting permissions for ${dir}/$file\n"; | ||
chmod 0755, "${dir}/$file"; | ||
} | ||
|
||
|
||
### Taring up the folder | ||
$dir =~ s/\/$//; | ||
warn "Tar command:\ntar czvf ${dir}.tar.gz $dir\n\n"; | ||
system ("tar czvf ${dir}.tar.gz $dir/"); |