Sponsored Content
Top Forums UNIX for Dummies Questions & Answers awk code to reconstruct sequence from alignment Post 302835553 by Fahmida on Monday 22nd of July 2013 03:27:58 PM
Old 07-22-2013
I need some help to construct a long 'Sbjct' string from the following input using incremental order of 'Sbjct' starting number (e.g. 26325115,33716368,33769033,34869860 etc.)
Different 'Sbject' string will be separated by 'NNNN's as:
Code:
(Sbjct:26325115-26325094)NNNN(Sbjct:33716368-33716347)NNNN(Sbjct:33769033-33769073)NNNN(Sbjct:34869860-34869889)

The output expected is shown in 'Example Output'.
Code:
--------- Example Input (just a small segment of the whole file)-----------

Score = 44.1 bits (22), Expect = 0.30
Identities = 28/30 (93%)
Strand = Plus / Plus

Query: 1684 atcaaaatgaccaaaatatttcattaaaaa 1713
|||||||||| |||||| ||||||||||||
Sbjct: 34869860 atcaaaatgaacaaaatgtttcattaaaaa 34869889

Score = 44.1 bits (22), Expect = 0.30
Identities = 22/22 (100%)
Strand = Plus / Minus


Query: 1758 ttagggtttagagttaaggggt 1779
||||||||||||||||||||||
Sbjct: 26325115 ttagggtttagagttaaggggt 26325094


Score = 44.1 bits (22), Expect = 0.30
Identities = 22/22 (100%)
Strand = Plus / Minus


Query: 1687 aaaatgaccaaaatatttcatt 1708
||||||||||||||||||||||
Sbjct: 33716368 aaaatgaccaaaatatttcatt 33716347


Score = 44.1 bits (22), Expect = 0.30
Identities = 38/42 (90%), Gaps = 1/42 (2%)
Strand = Plus / Plus


Query: 1734 ccctagggttaactaattcaaaccttagggtttagagttaag 1775
||||||| ||||||||| |||| ||||||||||||||||||
Sbjct: 33769033 ccctaggattaactaatctaaac-ttagggtttagagttaag 33769073

Code:
---------------------- Example Output -----------
Whole Sbjct string
ttagggtttagagttaaggggtNNNNaaaatgaccaaaatatttcattNNNNccctaggattaactaatctaaac-ttagggtttagagttaagNNNNatcaaaatgaacaaaatgtttcattaaaaa

Thanks for your help.
 

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
VERSION:(1)							   User Commands						       VERSION:(1)

NAME
PyNAST - alignment of short DNA sequences SYNOPSIS
pynast [options] {-i input_fp -t template_fp} DESCRIPTION
[] indicates optional input (order unimportant) {} indicates required input (order unimportant) Example usage: pynast -i my_input.fasta -t my_template.fasta OPTIONS
--version show program's version number and exit -h, --help show this help message and exit -t TEMPLATE_FP, --template_fp=TEMPLATE_FP path to template alignment file [REQUIRED] -i INPUT_FP, --input_fp=INPUT_FP path to input fasta file [REQUIRED] -v, --verbose Print status and other information during execution [default: False] -p MIN_PCT_ID, --min_pct_id=MIN_PCT_ID minimum percent sequence identity to consider a sequence a match [default: 75.0] -l MIN_LEN, --min_len=MIN_LEN minimum sequence length to include in NAST alignment [default: 1000] -m PAIRWISE_ALIGNMENT_METHOD, --pairwise_alignment_method=PAIRWISE_ALIGNMENT_METHOD method for performing pairwise alignment [default: uclust] -a FASTA_OUT_FP, --fasta_out_fp=FASTA_OUT_FP path to store resulting alignment file [default: derived from input filepath] -g LOG_FP, --log_fp=LOG_FP path to store log file [default: derived from input filepath] -f FAILURE_FP, --failure_fp=FAILURE_FP path to store file of seqs which fail to align [default: derived from input filepath] -e MAX_E_VALUE, --max_e_value=MAX_E_VALUE Depreciated. Will be removed in PyNAST 1.2 -d BLAST_DB, --blast_db=BLAST_DB Depreciated. Will be removed in PyNAST 1.2 SEE ALSO
http://pynast.sourceforge.net Version: pynast 1.1 August 2011 VERSION:(1)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy