SEQanswers

Go Back   SEQanswers > Sequencing Technologies/Companies > Illumina/Solexa



Similar Threads
Thread Thread Starter Forum Replies Last Post
A question about BWA index louis7781x Bioinformatics 9 04-02-2012 02:23 AM
BWA error and reference index satishkumar Introductions 1 11-19-2010 07:22 AM
bwa index option bwtsw sowmyai Bioinformatics 2 07-15-2010 09:30 AM
BWA index error aldrinyim Bioinformatics 3 02-14-2010 10:03 AM
BWA index adrian Bioinformatics 3 01-23-2010 07:10 AM

Reply
 
Thread Tools
Old 12-05-2013, 04:52 AM   #41
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,475
Default

Something like the following will put each record on a single line.
Code:
cat coverage.txt | awk 'BEGIN{first=1; OFS='\t'; ORS='\t';}{if(first==1) {print $0; first=0;} else {print "\t",$0,"\n"; first=1}}' > coverage.single_line.txt
dpryan is offline   Reply With Quote
Old 12-05-2013, 05:04 AM   #42
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default

I am afraid, that did not work
mmmm is offline   Reply With Quote
Old 12-05-2013, 05:21 AM   #43
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,498
Default

Devon's solution works for me. What is happening in your case?
GenoMax is offline   Reply With Quote
Old 12-05-2013, 05:24 AM   #44
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default

NC_022544.1 RefSeq gene 2096621 2097676 0 - 0 ID=gene2037;Name=cbiG;Dbxref=GeneID:17157414;gbkey=Gene;gene=cbiG;locus_tag=STMDT2_20011
2505 1056 1056 1 NC_022544.1 RefSeq CDS 2096621
2505 1056 1056 1
NC_022544.1 RefSeq gene 3145124 3146200 0 - 0 ID=gene2977;Name=STMDT2_29251;Dbxref=GeneID:17156485;gbkey=Gene;locus_tag=STMDT2_29251
1716 1077 1077 1 NC_022544.1 RefSeq CDS 3145124
1716 1077 1077 1
mmmm is offline   Reply With Quote
Old 12-05-2013, 05:27 AM   #45
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,498
Default

Wonder if this is a unix vs PC/Mac file format issue. Are you moving the file among machines before running the script? I pasted your original sample into a new file on unix and did not have any problem.
GenoMax is offline   Reply With Quote
Old 12-05-2013, 05:33 AM   #46
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,475
Default

That's my only guess. This works on both Ubuntu and OS X.
dpryan is offline   Reply With Quote
Old 12-05-2013, 05:53 AM   #47
mmmm
Senior Member
 
Location: UK

Join Date: Jul 2013
Posts: 131
Default

it is a very simple problem, as you can see in the below example:
the protein details are listed in the first row (columns from A to I) while coverage values are listed in the second row (coulmns B, C, D, E)- how to move these coverage values from the second row to the first row to columns J, K, L, M

NC_022544.1 RefSeq gene 2096621 2097676 0 - 0 ID=gene2037;Name=cbiG;Dbxref=GeneID:17157414;gbkey=Gene;gene=cbiG;locus_tag=STMDT2_20011
2505 1056 1056 1
mmmm is offline   Reply With Quote
Old 12-05-2013, 06:38 AM   #48
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,475
Default

Yeah, the awk command I posted works on both Linux and OS X. Presumably you're moving files between systems with different line endings or something like that. If so, my script could easily be converted to python and the input opened with "rU" to avoid that issue (or you could just change RS appropriately).
dpryan is offline   Reply With Quote
Old 11-09-2016, 08:30 AM   #49
jhonathan
Junior Member
 
Location: Piracicaba, São Paulo, Brazil

Join Date: Nov 2016
Posts: 1
Default

I transfered the reference genome file to other folder and solved the problem
jhonathan is offline   Reply With Quote
Reply

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 02:22 PM.


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