SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bfast jobs for analyzing AB's SOLiD data vs Illumina data genome_anawk1 Bioinformatics 1 08-24-2011 09:05 AM
sorting sam file crh Bioinformatics 2 06-16-2011 06:45 AM
blast e-value sorting NicoBxl Bioinformatics 10 03-09-2011 07:31 AM
Sorting large files scami Bioinformatics 3 09-20-2010 11:45 PM
ZOOM released (supporting both Illumina data and ABI SOLiD data) spirit Bioinformatics 2 08-21-2008 06:48 AM

Reply
 
Thread Tools
Old 12-10-2011, 04:03 PM   #1
xincognitax
Junior Member
 
Location: usa

Join Date: Dec 2011
Posts: 2
Default .

old delete

Last edited by xincognitax; 06-02-2019 at 08:57 AM. Reason: old delete
xincognitax is offline   Reply With Quote
Old 12-10-2011, 05:06 PM   #2
Heisman
Senior Member
 
Location: St. Louis

Join Date: Dec 2010
Posts: 535
Default

There is probably a better way but here are a couple of commands you will probably find useful and can play with to accomplish your goal. This will take the barcode from the header and put it at the end of the read, thus allowing you to analyze as you normally would. I'm not much of a computer person either but I had to google around a little while ago to figure this type of thing out for a different purpose.

sed -n '1,${p;n;}' [file] > odd_lines
sed -n '2,${p;n;}' [file] > even_lines

The odd_lines file will have the headers and the even_lines file will have the reads. Then, cut the odd_lines file to abstract the barcode.

cut -f2 -d # odd_lines > part_1
cut -f1 -d / part_1 > barcodes

Then paste the barcodes to the ends of the reads and get rid of the tabs that will be between them:

paste even_lines barcodes | tr -d '\011' > reads_with_barcodes

Then put the header part lines together without the barcodes:

cut -f1 -d # odd_lines > first_head
cut -f2 -d / odd_lines > second head

paste first_head second_head | tr '\t' '#/' > headers_without_barcodes

and then finally put the two files back together:

paste headers_without_barcodes reads_with_barcodes | tr '\t' '\n' > new_file_to_analyze

This should work, although there may be typos.
Heisman is offline   Reply With Quote
Old 12-11-2011, 05:33 PM   #3
xincognitax
Junior Member
 
Location: usa

Join Date: Dec 2011
Posts: 2
Default

old delete

Last edited by xincognitax; 06-02-2019 at 08:57 AM.
xincognitax 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:09 PM.


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