Sponsored Content
Top Forums UNIX for Dummies Questions & Answers awk code to reconstruct sequence from alignment Post 302835571 by Don Cragun on Monday 22nd of July 2013 04:12:04 PM
Old 07-22-2013
Fahmida, for future reference, note that you could have edited the 1st message in this thread to add CODE tags instead of duplicating it in a new message. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PrintF and AWK => Center Alignment?

Alright, I'm relativly new to the Unix enviroment and C in general. I'm writing a script for AWK to search through a file and return what it finds with a center alignment, but so far, I can't get it to work. If anyone could help me out, I'd really appreciate it. (1 Reply)
Discussion started by: Mavrick3020
1 Replies

2. UNIX for Dummies Questions & Answers

Tools for alignment of code?

Hello, Do we have any freeware which helps in alignment of code wrt spaces, sections etc? Thanks (6 Replies)
Discussion started by: eagercyber
6 Replies

3. Shell Programming and Scripting

suffix a sequence in awk

hi I have a string pattern like ... ... 000446448742 00432265 040520100408 21974435 DEWSWATER GARRIER AAG IK4000 N 017500180000000000000000077000000000100 000446448742 00580937 040520100408 32083576 PEWSWATER BARRIER DAG GK4000 ... (6 Replies)
Discussion started by: zainravi
6 Replies

4. Shell Programming and Scripting

find common entries and match the number with long sequence and cut that sequence in output

Hi all, I have a file like this ID 3BP5L_HUMAN Reviewed; 393 AA. AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3; DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot. DT 05-JUL-2004, sequence version 1. DT 05-SEP-2012, entry version 71. FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies

5. Shell Programming and Scripting

Using awk and/or sed to reconstruct a file

So I have a file in the following format >*42 abssdfalsdfkjfuf asdhfskdkdklllllllffl eiffejcif >2 dfhucujf dhfjdkfhskskkkkk eifjvujf ddftttyy yyy >~ ojcufk kcdheycjc djcyfjf and I would like it to output abssdfalsdfkjfufasdhfskdkdklllllllffleiffejcif (3 Replies)
Discussion started by: viored
3 Replies

6. Shell Programming and Scripting

> dpkg-deb to Extract and Reconstruct a Multipart Archive???

Greetings! Here's one which has been bugging me for a bit ;) As might be known, LibreOffice is available to some of us Linux folk as a large set of debs. Of course, being a curious sort, I'd like to dig in and recreate the original tree which is composed of these assorted archives. So, I... (1 Reply)
Discussion started by: LinQ
1 Replies

7. Shell Programming and Scripting

Inserting IDs from a text file into a sequence alignment file

Hi, I have one file with one column and several hundred entries File1: NA1 NA2 NA3And now I need to run a command within a mapping aligner tool to insert these sample names into a sequence alignment file (SAM) such that they look like this @RG ID:Library1 SM:NA1 PL:Illumina ... (7 Replies)
Discussion started by: nans
7 Replies

8. UNIX for Dummies Questions & Answers

Sequence of conditions awk

hello gurus, I want to use an associative array from a file to populate a field of another file, by matching several columns in order of priority. If the first column matches, then i dont want to match $2. Similarly I only want to match $3 when $1 and $2 are not in associative array. For the... (6 Replies)
Discussion started by: ritakadm
6 Replies

9. AIX

Power RAID10 array reconstruct fails ?

Hello, P7 machine PCI Express x8 Planar 3Gb SAS Adapter RAID10 array(2 disks)(not AIX lvm) was configured and working, then one disk failed and IBM support replaced that. Now raid array is degraded, data is not lost. I see new disk model(same as original) serial and etc. What I did trying... (0 Replies)
Discussion started by: vilius
0 Replies

10. UNIX for Beginners Questions & Answers

Help with awk alignment

Dear All, I am in the beginning stage of learning shell scripting and preparing shell script on my own now. I would like to get help from fellow mates here. As I am trying to take O/P with space included from I/P table. Kindly guide me to align given I/P table as Expected O/P. ... (5 Replies)
Discussion started by: Raja007
5 Replies
Bio::Search::BlastUtils(3pm)				User Contributed Perl Documentation			      Bio::Search::BlastUtils(3pm)

NAME
Bio::Search::BlastUtils - Utility functions for Bio::Search:: BLAST objects SYNOPSIS
# This module is just a collection of subroutines, not an object. See Bio::Search::Hit::BlastHit. DESCRIPTION
The BlastUtils.pm module is a collection of subroutines used primarily by Bio::Search::Hit::BlastHit objects for some of the additional functionality, such as HSP tiling. Right now, the BlastUtils is just a collection of methods, not an object, and it's tightly coupled to Bio::Search::Hit::BlastHit. A goal for the future is to generalize it to work based on the Bio::Search interfaces, then it can work with any objects that implements them. AUTHOR
Steve Chervitz <sac@bioperl.org> tile_hsps Usage : tile_hsps( $sbjct ); : This is called automatically by Bio::Search::Hit::BlastHit : during object construction or : as needed by methods that rely on having tiled data. Purpose : Collect statistics about the aligned sequences in a set of HSPs. : Calculates the following data across all HSPs: : -- total alignment length : -- total identical residues : -- total conserved residues Returns : n/a Argument : A Bio::Search::Hit::BlastHit object Throws : n/a Comments : : This method is *strongly* coupled to Bio::Search::Hit::BlastHit : (it accesses BlastHit data members directly). : TODO: Re-write this to the Bio::Search::Hit::HitI interface. : : This method performs more careful summing of data across : all HSPs in the Sbjct object. Only HSPs that are in the same strand : and frame are tiled. Simply summing the data from all HSPs : in the same strand and frame will overestimate the actual : length of the alignment if there is overlap between different HSPs : (often the case). : : The strategy is to tile the HSPs and sum over the : contigs, collecting data separately from overlapping and : non-overlapping regions of each HSP. To facilitate this, the : HSP.pm object now permits extraction of data from sub-sections : of an HSP. : : Additional useful information is collected from the results : of the tiling. It is possible that sub-sequences in : different HSPs will overlap significantly. In this case, it : is impossible to create a single unambiguous alignment by : concatenating the HSPs. The ambiguity may indicate the : presence of multiple, similar domains in one or both of the : aligned sequences. This ambiguity is recorded using the : ambiguous_aln() method. : : This method does not attempt to discern biologically : significant vs. insignificant overlaps. The allowable amount of : overlap can be set with the overlap() method or with the -OVERLAP : parameter used when constructing the Blast & Sbjct objects. : : For a given hit, both the query and the sbjct sequences are : tiled independently. : : -- If only query sequence HSPs overlap, : this may suggest multiple domains in the sbjct. : -- If only sbjct sequence HSPs overlap, : this may suggest multiple domains in the query. : -- If both query & sbjct sequence HSPs overlap, : this suggests multiple domains in both. : -- If neither query & sbjct sequence HSPs overlap, : this suggests either no multiple domains in either : sequence OR that both sequences have the same : distribution of multiple similar domains. : : This method can deal with the special case of when multiple : HSPs exactly overlap. : : Efficiency concerns: : Speed will be an issue for sequences with numerous HSPs. : Bugs : Currently, tile_hsps() does not properly account for : the number of non-tiled but overlapping HSPs, which becomes a problem : as overlap() grows. Large values overlap() may thus lead to : incorrect statistics for some hits. For best results, keep overlap() : below 5 (DEFAULT IS 2). For more about this, see the "HSP Tiling and : Ambiguous Alignments" section in L<Bio::Search::Hit::BlastHit>. See Also : _adjust_contigs(), Bio::Search::Hit::BlastHit _adjust_contigs Usage : n/a; called automatically during object construction. Purpose : Builds HSP contigs for a given BLAST hit. : Utility method called by _tile_hsps() Returns : Argument : Throws : Exceptions propagated from Bio::Search::Hit::BlastHSP::matches() : for invalid sub-sequence ranges. Status : Experimental Comments : This method does not currently support gapped alignments. : Also, it does not keep track of the number of HSPs that : overlap within the amount specified by overlap(). : This will lead to significant tracking errors for large : overlap values. See Also : tile_hsps(), Bio::Search::Hit::BlastHSP::matches get_exponent Usage : &get_exponent( number ); Purpose : Determines the power of 10 exponent of an integer, float, : or scientific notation number. Example : &get_exponent("4.0e-206"); : &get_exponent("0.00032"); : &get_exponent("10."); : &get_exponent("1000.0"); : &get_exponent("e+83"); Argument : Float, Integer, or scientific notation number Returns : Integer representing the exponent part of the number (+ or -). : If argument == 0 (zero), return value is "-999". Comments : Exponents are rounded up (less negative) if the mantissa is >= 5. : Exponents are rounded down (more negative) if the mantissa is <= -5. collapse_nums Usage : @cnums = collapse_nums( @numbers ); Purpose : Collapses a list of numbers into a set of ranges of consecutive terms: : Useful for condensing long lists of consecutive numbers. : EXPANDED: : 1 2 3 4 5 6 10 12 13 14 15 17 18 20 21 22 24 26 30 31 32 : COLLAPSED: : 1-6 10 12-15 17 18 20-22 24 26 30-32 Argument : List of numbers sorted numerically. Returns : List of numbers mixed with ranges of numbers (see above). Throws : n/a See Also : Bio::Search::Hit::BlastHit::seq_inds() strip_blast_html Usage : $boolean = &strip_blast_html( string_ref ); : This method is exported. Purpose : Removes HTML formatting from a supplied string. : Attempts to restore the Blast report to enable : parsing by Bio::SearchIO::blast.pm Returns : Boolean: true if string was stripped, false if not. Argument : string_ref = reference to a string containing the whole Blast : report containing HTML formatting. Throws : Croaks if the argument is not a scalar reference. Comments : Based on code originally written by Alex Dong Li : (ali@genet.sickkids.on.ca). : This method does some Blast-specific stripping : (adds back a '>' character in front of each HSP : alignment listing). : : THIS METHOD IS VERY SENSITIVE TO BLAST FORMATTING CHANGES! : : Removal of the HTML tags and accurate reconstitution of the : non-HTML-formatted report is highly dependent on structure of : the HTML-formatted version. For example, it assumes that first : line of each alignment section (HSP listing) starts with a : <a name=..> anchor tag. This permits the reconstruction of the : original report in which these lines begin with a ">". : This is required for parsing. : : If the structure of the Blast report itself is not intended to : be a standard, the structure of the HTML-formatted version : is even less so. Therefore, the use of this method to : reconstitute parsable Blast reports from HTML-format versions : should be considered a temorary solution. perl v5.14.2 2012-03-02 Bio::Search::BlastUtils(3pm)
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy