Hi Peasant,
Here is a slightly modified version of your script that just uses options and variable expansions defined by the POSIX standards. But, of course, it still depends on us knowing the pathname of a shell that provides those standard variable expansions. (Note that find isn't needed for this; we can get what we need just using shell pathname expansions.)
Hi cmccabe,
If Peasant's script (modified as suggested in post #5 worked for you, the script above should also work and should even run a little bit faster since it doesn't need to invoke find to get the job done.
I hope this helps,
Don
These 2 Users Gave Thanks to Don Cragun For This Post:
Dear Chaps,
What will I do if, I am not sure about the length of the file name, but only one thing that I want to remove only the last extension.
e.g. abcdXXXXXX.pqrXXXXX.asc (X is any character)
I want to trim only .asc (or,watever) so that resultant file name would be like... (1 Reply)
Hello,
I am an amature at UNIX commands and functionality.
Please could you all assist me by replying to my below mentioned querry :
How can I upload a zip folder on a unix path from my windows folder?
Thanks guys
Cheers (2 Replies)
Hi,
I need command to display files with full path and date of files where are generated at every 5hrs in a folder.
eg:
/u01/app/test/orjthsd_1_1 Sun May 10 19:03:26 2009
/u01/app/test/weoiusd_1_1 Sun May 10 21:00:26 2009
thanks
saha (3 Replies)
I have the following files in the dir /home/krishna/datatemp
abc.xml
cde.xml
asfd.txt
asdf_20120101-1.xml
asdf_20120101-2.xml
asdf_20120101-3.xml
asdf_20120101-4.xml
Now I need to move the files having the pattern asdf_20120101-*.xml to the dir /home/krishna/dataout with the extn as... (1 Reply)
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Hi
I have a requirement like this:
/abc/a/x.txt
/abc/a/y.txt
/abc/b/x.gz
/abc/b/y.txt
I need output like this:
/abc/a:*.txt
/abc/b:*.txt
/abc/b:*.gz
I have tried find /abc -type f -name "*.*" ||awk -F . '{print $NF}' it is print only extensions without path name.
Please... (5 Replies)
Hi! I would like to comm -12 with one file and with all of the files in another folder that has a 100 files or more (that file is not in that folder) to find common text lines. I would like to have each case that they have common lines to be written to a different output file and the names of the... (6 Replies)
Could it be possible to find common lines between all of the files in one folder? Just like comm -12 . So all of the files two at a time. I would like all of the outcomes to be written to a different files, and the file names could be simply numbers - 1 , 2 , 3 etc. All of the file names contain... (19 Replies)
In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT DEBIAN
bio::tools::run::samtools
Bio::Tools::Run::Samtools(3pm) User Contributed Perl Documentation Bio::Tools::Run::Samtools(3pm)NAME
Bio::Tools::Run::Samtools - a run wrapper for the samtools suite *BETA*
SYNOPSIS
# convert a sam to a bam
$samt = Bio::Tools::Run::Samtools( -command => 'view',
-sam_input => 1,
-bam_output => 1 );
$samt->run( -bam => "mysam.sam", -out => "mysam.bam" );
# sort it
$samt = Bio::Tools::Run::Samtools( -command => 'sort' );
$samt->run( -bam => "mysam.bam", -pfx => "mysam.srt" );
# now create an assembly
$assy = Bio::IO::Assembly->new( -file => "mysam.srt.bam",
-refdb => "myref.fas" );
DESCRIPTION
This is a wrapper for running samtools, a suite of large-alignment reading and manipulation programs available at
<http://samtools.sourceforge.net/>.
RUNNING COMMANDS
To run a "samtools" command, construct a run factory, specifying the desired command using the "-command" argument in the factory
constructor, along with options specific to that command (see "OPTIONS"):
$samt = Bio::Tools::Run::Samtools->new( -command => 'view',
-sam_input => 1,
-bam_output => 1);
To execute, use the "run()" method. Input and output files are specified in the arguments of "run()" (see "FILES"):
$samt->run( -bam => "mysam.sam", -out => "mysam.bam" );
OPTIONS
"samtools" is complex, with many subprograms (commands) and command-line options and file specs for each. This module attempts to provide
commands and options comprehensively. You can browse the choices like so:
$samt = Bio::Tools::Run::Samtools->new( -command => 'pileup' );
# all samtools commands
@all_commands = $samt->available_parameters('commands');
@all_commands = $samt->available_commands; # alias
# just for pileup
@pup_params = $samt->available_parameters('params');
@pup_switches = $samt->available_parameters('switches');
@pup_all_options = $samt->available_parameters();
Reasonably mnemonic names have been assigned to the single-letter command line options. These are the names returned by
"available_parameters", and can be used in the factory constructor like typical BioPerl named parameters.
See <http://samtools.sourceforge.net/samtools.shtml> for the gory details.
FILES
When a command requires filenames, these are provided to the "run()" method, not the constructor ("new()"). To see the set of files
required by a command, use "available_parameters('filespec')" or the alias "filespec()":
$samt = Bio::Tools::Run::Samtools->new( -command => 'view' );
@filespec = $samt->filespec;
This example returns the following array:
bam
>out
This indicates that the bam/sam file (bam) and the output file (out) MUST be specified in the "run()" argument list:
$samt->run( -bam => 'mysam.sam', -out => 'mysam.cvt' );
If files are not specified per the filespec, text sent to STDOUT and STDERR is saved and is accessible with "$bwafac-"stdout()> and
"$bwafac-"stderr()>.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the
Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address
it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the
web:
http://redmine.open-bio.org/projects/bioperl/
AUTHOR - Mark A. Jensen
Email maj -at- fortinbras -dot- us
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : new
Usage : my $obj = new Bio::Tools::Run::Samtools();
Function: Builds a new Bio::Tools::Run::Samtools object
Returns : an instance of Bio::Tools::Run::Samtools
Args :
perl v5.12.3 2011-06-18 Bio::Tools::Run::Samtools(3pm)