Sponsored Content
Full Discussion: fasta format?
Top Forums UNIX for Dummies Questions & Answers fasta format? Post 302281114 by lost on Wednesday 28th of January 2009 08:29:17 AM
Old 01-28-2009
So if the command gsed isn't recognised, I don't have GNU sed on the terminal? or is there other short cuts to make a GNU sed command executable in non-GNU environment?
Dang it... Any way, THANKS!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep FASTA files

I would like to extract the sequences larger than 10 bases but shorter than 18 along with the identifier from a FASTA file that looks like this: > Seq I ACGACTAGACGATAGACGATAGA > Seq 2 ACGATGACGTAGCAGT > Seq 3 ACGATACGAT I know I can extract the IDs alone with the following code grep... (3 Replies)
Discussion started by: Xterra
3 Replies

2. Shell Programming and Scripting

Changing from FASTA to PHYLIP format

I really need some help with this task. I have a bunch of FASTA files with hundreds of DNA sequences that look like this: >SeqID1 AACCATGACAGAGGAGATGTGAACAGATAGAGGGATGACAGATGACAGATAGACCCAGAC TGACAGGTTCAAAGGCTGCAGTGCAGTGACGTGACGATTT >Sequence 22... (13 Replies)
Discussion started by: Xterra
13 Replies

3. UNIX for Dummies Questions & Answers

renaming (renumbering) fasta files

I have a fasta file that looks like this: >Noname ACCAAAATAATTCATGATATACTCAGATCCATCTGAGGGTTTCACCACTTGTAGAGCTAT CAGAAGAATGTCAATCAACTGTCCGAGAAAAAAGAATCCCAGG >Noname ACTATAAACCCTATTTCTCTTTCTAAAAATTGAAATATTAAAGAAACTAGCACTAGCCTG ACCTTTAGCCAGACTTCTCACTCTTAATGCTGCGGACAAACAGA ... I want to... (2 Replies)
Discussion started by: Oyster
2 Replies

4. 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

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. UNIX for Dummies Questions & Answers

Fasta header modification

Hi, I need some help with modifying fasta headers. I have a fasta file with thousands of contigs and I need to modify their headers with the information obtained from a second file. File 1 contains the fasta sequences: >contig0001 length=11115 numreads=10777 agatgtagatctct... (6 Replies)
Discussion started by: Lokaps
6 Replies

7. UNIX for Dummies Questions & Answers

Round up -FASTA file

I have the following script: awk 'FNR==NR{s+=$3;next;} { print $1 , $2, 100*$3/s }' and the following file: >P39PT-1224 Freq 900 cccctacgacggcattggtaatggctcagctgctccggatcccgcaagccatcttggatatgagggttcgtcggcctcttcagccaagg-cccccagcagaacatccagctgatcg >P39PT-784 Freq 2... (2 Replies)
Discussion started by: Xterra
2 Replies

8. Shell Programming and Scripting

Help with reformat single-line multi-fasta into multi-line multi-fasta

Input File: >Seq1 ASDADAFASFASFADGSDGFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSD >Seq2 SDASDAQEQWEQeqAdfaasd >Seq3 ASDSALGHIUDFJANCAGPATHLACJHPAUTYNJKG ...... Desired Output File >Seq1 ASDADAFASF ASFADGSDGF SDFSDFSDFS DFSDFSDFSD FSDFSDFSDF SD >Seq2 (4 Replies)
Discussion started by: patrick87
4 Replies

9. UNIX for Beginners Questions & Answers

How to count the length of fasta sequences?

I could calculate the length of entire fasta sequences by following command, awk '/^>/{if (l!="") print l; print; l=0; next}{l+=length($0)}END{print l}' unique.fasta But, I need to calculate the length of a particular fasta sequence specified/listed in another txt file. The results to to be... (14 Replies)
Discussion started by: dineshkumarsrk
14 Replies

10. UNIX for Beginners Questions & Answers

How to append two fasta files?

I have two fasta files as shown below, File:1 >Contig_1:90600-91187 AAGGCCATCAAGGACGTGGATGAGGTCGTCAAGGGCAAGGAACAGGAATTGATGACGGTC >Contig_98:35323-35886 GACGAAGCGCTCGCCAAGGCCGAAGAAGAAGGCCTGGATCTGGTCGAAATCCAGCCGCAG >Contig_24:26615-28387... (11 Replies)
Discussion started by: dineshkumarsrk
11 Replies
Bio::Index::Fasta(3pm)					User Contributed Perl Documentation				    Bio::Index::Fasta(3pm)

NAME
Bio::Index::Fasta - Interface for indexing (multiple) fasta files SYNOPSIS
# Make an index for one or more fasta files use Bio::Index::Fasta; use strict; my $Index_File_Name = shift; my $inx = Bio::Index::Fasta->new(-filename => $Index_File_Name, -write_flag => 1); $inx->make_index(@ARGV); # Once the index is made it can accessed, either in the # same script or a different one use Bio::Index::Fasta; use strict; my $Index_File_Name = shift; my $inx = Bio::Index::Fasta->new(-filename => $Index_File_Name); my $out = Bio::SeqIO->new(-format => 'Fasta', -fh => *STDOUT); foreach my $id (@ARGV) { my $seq = $inx->fetch($id); # Returns Bio::Seq object $out->write_seq($seq); } # or, alternatively my $id; my $seq = $inx->get_Seq_by_id($id); # identical to fetch() DESCRIPTION
Inherits functions for managing dbm files from Bio::Index::Abstract.pm, and provides the basic funtionallity for indexing fasta files, and retrieving the sequence from them. For best results 'use strict'. Bio::Index::Fasta supports the Bio::DB::BioSeqI interface, meaning it can be used as a Sequence database for other parts of bioperl Additional example code is available in scripts/index/*PLS and in the Bioperl Tutorial (<http://www.bioperl.org/wiki/Bptutorial.pl>) Note that by default the key for the sequence will be the first continuous string after the '>' in the fasta header. If you want to use a specific substring of the fasta header you must use the id_parser() method. You can also set or customize the unique key used to retrieve by writing your own function and calling the id_parser() method. For example: $inx->id_parser(&get_id); # make the index $inx->make_index($file_name); # here is where the retrieval key is specified sub get_id { my $line = shift; $line =~ /^>.+gi|(d+)/; $1; } FEED_BACK Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. 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 the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - James Gilbert Email - jgrg@sanger.ac.uk APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ _file_format Title : _file_format Function: The file format for this package, which is needed by the SeqIO system when reading the sequence. Returns : 'Fasta' _index_file Title : _index_file Usage : $index->_index_file( $file_name, $i ) Function: Specialist function to index FASTA format files. Is provided with a filename and an integer by make_index in its SUPER class. Example : Returns : Args : id_parser Title : id_parser Usage : $index->id_parser( CODE ) Function: Stores or returns the code used by record_id to parse the ID for record from a string. Useful for (for instance) specifying a different parser for different flavours of FASTA file. Returns &default_id_parser (see below) if not set. If you supply your own id_parser subroutine, then it should expect a fasta description line. An entry will be added to the index for each string in the list returned. Example : $index->id_parser( &my_id_parser ) Returns : ref to CODE if called without arguments Args : CODE default_id_parser Title : default_id_parser Usage : $id = default_id_parser( $header ) Function: The default Fasta ID parser for Fasta.pm Returns $1 from applying the regexp /^>s*(S+)/ to $header. Returns : ID string Args : a fasta header line string perl v5.14.2 2012-03-02 Bio::Index::Fasta(3pm)
All times are GMT -4. The time now is 08:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy