Sponsored Content
Top Forums Shell Programming and Scripting Parsing a fasta sequence with start and end coordinates Post 302514152 by empyrean on Friday 15th of April 2011 01:29:40 AM
Old 04-15-2011
Parsing a fasta sequence with start and end coordinates

Hi.. I have a seperate chromosome sequences and i wanted to parse some regions of chromosome based on start site and end site.. how can i achieve this?

For Example Chr 1 is in following format

Quote:
>chr1
GAATTCCAAAGCCAAAGATTGCATCAGTTCTGCTGCTATTTCCTCCTATCATTCTTTCTGATGTTGAAAATGATATTAAG
I need regions from 2 - 10 should give me AATTCCAAA

and in a similar way 15- 25 should give me AAGATTGCAT

and from 27 - 30 should give me AGTT

How can i do it either in perl or bioperl or awk or any other way?

Last edited by empyrean; 04-15-2011 at 02:55 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help Parsing Sequence File

Hi Everyone, I am new in the world of UNIX and Shell scripting. I am working with a sequence file that looks like this: >contig00001 length=128 numreads=2 aTGTGCTGGgTGGGTGCCTGTTgCCccATGCTCCAGTtCAGGATTtCAGGCAttCTCATG TCCAGCATTTCTATTTAATCCTGCTGCTGGACTTGGGTGGtCTCAGTCtGGGAAGTGAGC tGTCTGTG... (8 Replies)
Discussion started by: Fahmida
8 Replies

2. UNIX for Dummies Questions & Answers

How to change sequence name in along fasta file?

Hi I have an alignment file (.fasta) with ~80 sequences. They look like this- >JV101.contig00066(+):25302-42404|sequence_index=0|block_index=4|species=JV101|JV101_4_0 GAGGTTAATTATCGATAACGTTTAATTAAAGTGTTTAGGTGTCATAATTT TAAATGACGATTTCTCATTACCATACACCTAAATTATCATCAATCTGAAT... (2 Replies)
Discussion started by: baika
2 Replies

3. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

4. UNIX for Dummies Questions & Answers

Change sequence names in fasta file

I have fasta files with multiple sequences in each. I need to change the sequence name headers from: >accD:_59176-60699 ATGGAAAAGTGGAGGATTTATTCGTTTCAGAAGGAGTTCGAACGCA >atpA_(reverse_strand):_showing_revcomp_of_10525-12048 ATGGTAACCATTCAAGCCGACGAAATTAGTAATCTTATCCGGGAAC... (2 Replies)
Discussion started by: tyrianthinae
2 Replies

5. Shell Programming and Scripting

Extract sequence from fasta file

Hi, I want to match the sequence id (sub-string of line starting with '>' and extract the information upto next '>' line ). Please help . input > fefrwefrwef X900 AGAGGGAATTGG AGGGGCCTGGAG GGTTCTCTTC > fefrwefrwef X932 AGAGGGAATTGG AGGAGGTGGAG GGTTCTCTTC > fefrwefrwef X937... (2 Replies)
Discussion started by: ritakadm
2 Replies

6. Shell Programming and Scripting

Count and search by sequence in multiple fasta file

Hello, I have 10 fasta files with sequenced reads information with read sizes from 15 - 35 . I have combined the reads and collapsed in to unique reads and filtered for sizes 18 - 26 bp long unique reads. Now i wanted to count each unique read appearance in all the fasta files and make a table... (5 Replies)
Discussion started by: empyrean
5 Replies

7. Shell Programming and Scripting

Parsing and masking regions from a single fasta file with subsequence

HI, I have a Complete genome fasta file and I have list of sub sequence regions in the format as : 4353..5633 6795..9354 1034..14456 I want a script which can mask these region in a single complete genome fasta file with the alphabet N kindly help (2 Replies)
Discussion started by: margarita
2 Replies

8. Shell Programming and Scripting

Command Line Perl for parsing fasta file

I would like to take a fasta file formated like >0001 agttcgaggtcagaatt >0002 agttcgag >0003 ggtaacctga and use command line perl to move the all sample gt 8 in length to a new file. the result would be >0001 agttcgaggtcagaatt >0003 ggtaacctga cat ${sample}.fasta | perl -lane... (2 Replies)
Discussion started by: jdilts
2 Replies

9. UNIX for Beginners Questions & Answers

How to find a specific sequence pattern in a fasta file?

I have to mine the following sequence pattern from a large fasta file namely gene.fasta (contains multiple fasta sequences) along with the flanking sequences of 5 bases at starting position and ending position, AAGCZ-N16-AAGCZ Z represents A, C or G (Except T) N16 represents any of the four... (3 Replies)
Discussion started by: dineshkumarsrk
3 Replies

10. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies
Bio::Map::CytoMarker(3pm)				User Contributed Perl Documentation				 Bio::Map::CytoMarker(3pm)

NAME
Bio::Map::CytoMarker - An object representing a marker. SYNOPSIS
$o_usat = Bio::Map::CytoMarker->new(-name=>'Chad Super Marker 2', -position => $pos); DESCRIPTION
This object handles markers with a positon in a cytogenetic map known. This marker will have a name and a position. FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - Heikki Lehvaslaiho Email heikki-at-bioperl-dot-org CONTRIBUTORS
Chad Matsalla bioinformatics1@dieselwurks.com Lincoln Stein lstein@cshl.org Jason Stajich jason@bioperl.org Sendu Bala bix@sendu.me.uk APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ Bio::Map::MarkerI methods get_position_object Title : get_position_class Usage : my $position = $marker->get_position_object(); Function: To get an object of the default Position class for this Marker. Subclasses should redefine this method. The Position returned needs to be a L<Bio::Map::PositionI> with -element set to self. Returns : L<Bio::Map::PositionI> Args : none for an 'empty' PositionI object, optionally Bio::Map::MapI and value string to set the Position's -map and -value attributes. Comparison methods The numeric values for cutogeneic loctions go from the p tip of chromosome 1, down to the q tip and similarly throgh consecutive chromosomes, through X and end the the q tip of X. See Bio::Map::CytoPosition::cytorange for more details. New methods get_chr Title : get_chr Usage : my $mychr = $marker->get_chr(); Function: Read only method for the chromosome string of the location. A shortcut to $marker->position->chr(). Returns : chromosome value Args : [optional] new chromosome value perl v5.14.2 2012-03-02 Bio::Map::CytoMarker(3pm)
All times are GMT -4. The time now is 08:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy