SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy and paste a large bulk of text? Fad2012 Bioinformatics 2 05-29-2013 10:54 AM
Character replacement of Textfile syintel87 Bioinformatics 5 01-03-2013 02:13 AM
space character in headers frymor Bioinformatics 6 11-03-2011 08:11 AM
SAMtools - * character in pileup file JosieR Bioinformatics 9 09-08-2010 12:14 PM
N character in Illumina fastq format balamudiam Illumina/Solexa 1 12-14-2009 12:53 AM

Reply
 
Thread Tools
Old 09-02-2013, 03:48 AM   #1
Shishir
Member
 
Location: Germany

Join Date: Nov 2012
Posts: 22
Default Copy the column and paste it with special character

Hi all,

I have a input file like

C3905550 oder CDS 68 646 . - . asmbl_487
C3905550 oder exon 68 646 . - . asmbl_418
C3918365 oder CDS 42 252 . + . asmbl_445
C3918365 oder exon 42 252 . + . asmbl_443

all columns are separed by TAB

I want to create a new output file like :
C3905550 oder CDS 68 646 . - . asmbl_487 "asmbl_487"
C3905550 oder exon 68 646 . - . asmbl_418 "asmbl_418"
C3918365 oder CDS 42 252 . + . asmbl_445 "asmbl_445"
C3918365 oder exon 42 252 . + . asmbl_443 "asmbl_443"

in the output file last column should be copied and pasted with "" and this new column should be separated by space not by TAB, and rest of column should be like in input file and separated by TAB

Thanks!
Shishir is offline   Reply With Quote
Old 09-02-2013, 03:56 AM   #2
rhinoceros
Senior Member
 
Location: sub-surface moon base

Join Date: Apr 2013
Posts: 372
Default

http://stackoverflow.com/questions/ask/advice?

It's the place to ask. Extremely fast feedback. Just make sure that your question hasn't been asked before..
rhinoceros is offline   Reply With Quote
Old 09-02-2013, 07:08 AM   #3
sphil
Senior Member
 
Location: Stuttgart, Germany

Join Date: Apr 2010
Posts: 192
Default

awk '{ printf("%40s%40s%40s\n", $1, $2, '"$2"'); }' < input > output


not tested but it should work

else there is an entry on stackoverflow:

http://stackoverflow.com/questions/1...me-field-twice
sphil is offline   Reply With Quote
Reply

Tags
bash, bioinformatics, linux, parse, perl

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 03:06 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO