Hi,
I am having file which contains around 15 columns, i need to fetch column 3,12,14 based on the condition that column 3 starts with 40464
this is the sample data
how to achieve that (3 Replies)
I’m trying to modify someone perl script to fix a bug. The piece of code checks that the zone name you want to add is unique. However, when the code runs, it finds a partial match using grep, and decides it already exists, so the “create” command exits.
$cstatus = `${ZADM} list -vic | grep... (3 Replies)
Hi, I was trying to figure this out but failed so I hope someone here can help me, thank you in advance.
I have two files.
file1: aa M
bb N
cc O
dd P
ee Q file2: aa A_87_P254063
cc A_87_P016532
bb A_87_P104793
dd A_87_P055331
ee A_87_P059706
aa A_87_P071636
ee A_87_P028302... (2 Replies)
Hi I have a question and hope I can get answer here. Thank you in advance.
I have two files:
file1:
aa X
bb Y
cc Z
file2:
cc A
bb B
dd C
aa D
bb E
If the 1st column match in both file1 and file2, the 2nd column in file2 will be replaced by the 2nd column in file1. If there is no... (2 Replies)
I posted the incorrect files yesterday and apologize. I also modified the awk script but with no luck. There are two text files in the zip (name.txt and output.txt). I am trying to match $2 in name.txt with $1 in output.txt and if they match then $1 of name.txt is copied to $7 of output.txt. ... (7 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 All,
I have 100 folders with the first delimiter has a unique name i.e (123_hello and 575_hello) and each folder have atlist 1000 plus files with naming convention i.e (575_hello_1.iso ... 575_hello_1000.iso).
575_hello/575_hello_1.iso
575_hello/575_hello_2.iso
575_hello/575_hello_3.iso... (8 Replies)
Hi, I have a tab delimited text file like this one. I need to do a partial match of a particular cell and then replace matches with an empty cell. So here is a sample:
Smith FordMustang ChevroletCamaro
Miller FordFiesta
Jones KiaSorrento
Davis ChevroletCamaro
Johnson ToyotaHighlander
I... (4 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
In the portion of bash below I am using rename to match the $id variable to $file and when a match (there will alwsys be one) is found then the $id is removed from each bam and bam.bai in $file and _test is added to thee file name before the extension. Each of the variables is set correctly but... (3 Replies)
Discussion started by: cmccabe
3 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)