Sponsored Content
Top Forums Shell Programming and Scripting Shorten header of protein sequences in fasta file to only organism name Post 303040292 by jerrild on Saturday 26th of October 2019 02:38:12 AM
Old 10-26-2019
Thanks, would it be possible to retain the '>' at the header of each sequence?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to shorten usernames and output to file

Hopefully someone here can point me in the correct direction. I'm working on a username migration and am trying to map my users ols usernames to the new ones. Right now every user has a username of firstname.lastname i.e. john.doe I'm trying to create a bash or python script that will take... (3 Replies)
Discussion started by: binary-ninja
3 Replies

2. Shell Programming and Scripting

Shell script for changing the accession number of DNA sequences in a FASTA file

Hi, I am having a file of dna sequences in fasta format which look like this: >admin_1_45 atatagcaga >admin_1_46 atatagcagaatatatat with many such thousands of sequences in a single file. I want to the replace the accession Id "admin_1_45" similarly in following sequences to... (5 Replies)
Discussion started by: margarita
5 Replies

3. Shell Programming and Scripting

Extract sequences from a FASTA file based on another file

I have two files. File1 is shown below. >153L:B|PDBID|CHAIN|SEQUENCE RTDCYGNVNRIDTTGASCKTAKPEGLSYCGVSASKKIAERDLQAMDRYKTIIKKVGEKLCVEPAVIAGIISRESHAGKVL KNGWGDRGNGFGLMQVDKRSHKPQGTWNGEVHITQGTTILINFIKTIQKKFPSWTKDQQLKGGISAYNAGAGNVRSYARM DIGTTHDDYANDVVARAQYYKQHGY >16VP:A|PDBID|CHAIN|SEQUENCE... (7 Replies)
Discussion started by: nelsonfrans
7 Replies

4. Shell Programming and Scripting

Shorten header of protein sequences in fasta file

I have a fasta file as follows >sp|O15090|FABP4_HUMAN Fatty acid-binding protein, adipocyte OS=Homo sapiens GN=FABP4 PE=1 SV=3 MCDAFVGTWKLVSSENFDDYMKEVGVGFATRKVAGMAKPNMIISVNGDVITIKSESTFKN TEISFILGQEFDEVTADDRKVKSTITLDGGVLVHVQKWDGKSTTIKRKREDDKLVVECVM KGVTSTRVYERA >sp|L18484|AP2A2_RAT AP-2... (3 Replies)
Discussion started by: alexypaul
3 Replies

5. UNIX for Dummies Questions & Answers

Select distinct sequences from fasta file and list

Hi How can I extract sequences from a fasta file with respect a certain criteria? The beginning of my file (containing in total more than 1000 sequences) looks like this: >H8V34IS02I59VP SDACNDLTIALLQIAREVRVCNPTFSFRWHPQVKDEVMRECFDCIRQGLG YPSMRNDPILIANCMNWHGHPLEEARQWVHQACMSPCPSTKHGFQPFRMA... (6 Replies)
Discussion started by: Marion MPI
6 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. Shell Programming and Scripting

Getting unique sequences from multiple fasta file

Hi, I have a fasta file with multiple sequences. How can i get only unique sequences from the file. For example my_file.fasta >seq1 TCTCAAAGAAAGCTGTGCTGCATACTGTACAAAACTTTGTCTGGAGAGATGGAGAATCTCATTGACTTTACAGGTGTGGACGGTCTTCAGAGATGGCTCAAGCTAACATTCCCTGACACACCTATAGGGAAAGAGCTAAC >seq2... (3 Replies)
Discussion started by: Ibk
3 Replies

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

9. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies

10. UNIX for Beginners Questions & Answers

How to add specific bases at the beginning and ending of all the fasta sequences?

Hi, I have to add 7 bases of specific nucleotide at the beginning and ending of all the fasta sequences of a file. For example, I have a multi fasta file namely test.fasta as given below test.fasta >TalAA18_Xoo_CIAT_NZ_CP033194.1:_2936369-2939570:+1... (1 Reply)
Discussion started by: dineshkumarsrk
1 Replies
MPSGRUDescriptor(3)					 MetalPerformanceShaders.framework				       MPSGRUDescriptor(3)

NAME
MPSGRUDescriptor SYNOPSIS
#import <MPSRNNLayer.h> Inherits MPSRNNDescriptor. Class Methods (nonnull instancetype) + createGRUDescriptorWithInputFeatureChannels:outputFeatureChannels: Properties id< MPSCNNConvolutionDataSource > inputGateInputWeights id< MPSCNNConvolutionDataSource > inputGateRecurrentWeights id< MPSCNNConvolutionDataSource > recurrentGateInputWeights id< MPSCNNConvolutionDataSource > recurrentGateRecurrentWeights id< MPSCNNConvolutionDataSource > outputGateInputWeights id< MPSCNNConvolutionDataSource > outputGateRecurrentWeights id< MPSCNNConvolutionDataSource > outputGateInputGateWeights float gatePnormValue BOOL flipOutputGates Detailed Description This depends on Metal.framework The MPSGRUDescriptor specifies a GRU (Gated Recurrent Unit) block/layer descriptor. The RNN layer initialized with a MPSGRUDescriptor transforms the input data (image or matrix), and previous output with a set of filters, each producing one feature map in the output data according to the Gated unit formulae detailed below. The user may provide the GRU unit a single input or a sequence of inputs. The layer also supports p-norm gating (Detailed in: https://arxiv.org/abs/1608.03639 ). Description of operation: Let x_j be the input data (at time index t of sequence, j index containing quadruplet: batch index, x,y and feature index (x=y=0 for matrices)). Let h0_j be the recurrent input (previous output) data from previous time step (at time index t-1 of sequence). Let h_i be the proposed new output. Let h1_i be the output data produced at this time step. Let Wz_ij, Uz_ij, be the input gate weights for input and recurrent input data respectively Let bi_i be the bias for the input gate Let Wr_ij, Ur_ij be the recurrent gate weights for input and recurrent input data respectively Let br_i be the bias for the recurrent gate Let Wh_ij, Uh_ij, Vh_ij, be the output gate weights for input, recurrent gate and input gate respectively Let bh_i be the bias for the output gate Let gz(x), gr(x), gh(x) be the neuron activation function for the input, recurrent and output gates Let p > 0 be a scalar variable (typicall p >= 1.0) that defines the p-norm gating norm value. Then the output of the Gated Recurrent Unit layer is computed as follows: z_i = gz( Wz_ij * x_j + Uz_ij * h0_j + bz_i ) r_i = gr( Wr_ij * x_j + Ur_ij * h0_j + br_i ) c_i = Uh_ij * (r_j h0_j) + Vh_ij * (z_j h0_j) h_i = gh( Wh_ij * x_j + c_i + bh_i ) h1_i = ( 1 - z_i ^ p)^(1/p) h0_i + z_i h_i The '*' stands for convolution (see MPSRNNImageInferenceLayer) or matrix-vector/matrix multiplication (see MPSRNNMatrixInferenceLayer). Summation is over index j (except for the batch index), but there is no summation over repeated index i - the output index. Note that for validity all intermediate images have to be of same size and all U and V matrices have to be square (ie. outputFeatureChannels == inputFeatureChannels in those). Also the bias terms are scalars wrt. spatial dimensions. The conventional GRU block is achieved by setting Vh = 0 (nil) and the so-called Minimal Gated Unit is achieved with Uh = 0. (The Minimal Gated Unit is detailed in: https://arxiv.org/abs/1603.09420 and there they call z_i the value of the forget gate). Method Documentation + (nonnull instancetype) createGRUDescriptorWithInputFeatureChannels: (NSUInteger) inputFeatureChannels(NSUInteger) outputFeatureChannels Creates a GRU descriptor. Parameters: inputFeatureChannels The number of feature channels in the input image/matrix. Must be >= 1. outputFeatureChannels The number of feature channels in the output image/matrix. Must be >= 1. Returns: A valid MPSGRUDescriptor object or nil, if failure. Property Documentation - flipOutputGates [read], [write], [nonatomic], [assign] If YES then the GRU-block output formula is changed to: h1_i = ( 1 - z_i ^ p)^(1/p) h_i + z_i h0_i. Defaults to NO. - gatePnormValue [read], [write], [nonatomic], [assign] The p-norm gating norm value as specified by the GRU formulae. Defaults to 1.0f. - inputGateInputWeights [read], [write], [nonatomic], [retain] Contains weights 'Wz_ij', bias 'bz_i' and neuron 'gz' from the GRU formula. If nil then assumed zero weights, bias and no neuron (identity mapping). Defaults to nil. - inputGateRecurrentWeights [read], [write], [nonatomic], [retain] Contains weights 'Uz_ij' from the GRU formula. If nil then assumed zero weights. Defaults to nil. - outputGateInputGateWeights [read], [write], [nonatomic], [retain] Contains weights 'Vh_ij' - can be used to implement the 'Minimally Gated Unit'. If nil then assumed zero weights. Defaults to nil. - outputGateInputWeights [read], [write], [nonatomic], [retain] Contains weights 'Wh_ij', bias 'bh_i' and neuron 'gh' from the GRU formula. If nil then assumed zero weights, bias and no neuron (identity mapping).Defaults to nil. - outputGateRecurrentWeights [read], [write], [nonatomic], [retain] Contains weights 'Uh_ij' from the GRU formula. If nil then assumed zero weights. Defaults to nil. - recurrentGateInputWeights [read], [write], [nonatomic], [retain] Contains weights 'Wr_ij', bias 'br_i' and neuron 'gr' from the GRU formula. If nil then assumed zero weights, bias and no neuron (identity mapping).Defaults to nil. - recurrentGateRecurrentWeights [read], [write], [nonatomic], [retain] Contains weights 'Ur_ij' from the GRU formula. If nil then assumed zero weights.Defaults to nil. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSGRUDescriptor(3)
All times are GMT -4. The time now is 10:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy