Sponsored Content
Top Forums Shell Programming and Scripting Removing low frequency sequences Post 302432290 by Xterra on Thursday 24th of June 2010 02:59:35 PM
Old 06-24-2010
Removing low frequency sequences

If I have a file with the following information
Quote:
>GHL8OVD01BNNCA Freq 2
TTGATGTGCCCGTGGGTTTCCCGTCAACACCGGCAAATAGTAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01CMQVT Freq 15
TTGATGTCGTGGGTTTCCCGTCAACACCGGCAAATAGTAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01BNNCF Freq 2
TTGATGTGCCAGCTGCACTTCCCCCGGTGACGTGGGTTTCCCGTCTAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01CMQVW Freq 11
TTGATGTGTCCCGTCGACACCGGCAAATAGCAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01A45V3 Freq 9
TTGATTCCCGTCGACACCGGCAAATAGCAGCAGCACTACAGGACCTTCGCCCA
>GHL8OVD01B9PRR Freq 1
TTGATGTGCCAGCTTTCGCGTCGACACCGGCAAATAGTAGCAGCGCTACCAGGACCTTCGCCCA
>GHL8OVD01BL8BD Freq 4
TTGATGAGTACTTCCCCCGGTGACGTGGGTCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01AV2U9 Freq 17
TTGATGTGCCAACTAGCAAGACTGCGCGTGCAAATAGTAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01BJX6A Freq 3
TTGATGTGCCAGCTGCCGTTGTCCCCCGGTGACGTGGGTCTCCCGTCGAGGACCTTCGCCCA
>GHL8OVD01A9D5T Freq 1
TGATGTGCCAGCCCCGGTGACGTGGGTTTCCGGTCGACATTCGCCCA
And I would like to remove all the sequences with Freq less than 3, so I end up having the following file:
Quote:
>GHL8OVD01CMQVT Freq 15
TTGATGTCGTGGGTTTCCCGTCAACACCGGCAAATAGTAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01CMQVW Freq 11
TTGATGTGTCCCGTCGACACCGGCAAATAGCAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01A45V3 Freq 9
TTGATTCCCGTCGACACCGGCAAATAGCAGCAGCACTACAGGACCTTCGCCCA
>GHL8OVD01BL8BD Freq 4
TTGATGAGTACTTCCCCCGGTGACGTGGGTCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01AV2U9 Freq 17
TTGATGTGCCAACTAGCAAGACTGCGCGTGCAAATAGTAGCAGCACTACCAGGACCTTCGCCCA
>GHL8OVD01BJX6A Freq 3
TTGATGTGCCAGCTGCCGTTGTCCCCCGGTGACGTGGGTCTCCCGTCGAGGACCTTCGCCCA
I am currently using awk to accomplish this task but I am not getting the results I actually want.
Any help will be greatly appreciated.

Last edited by Xterra; 06-24-2010 at 04:31 PM..
 

10 More Discussions You Might Find Interesting

1. Solaris

Available escape sequences

:) Hi, Can any one help me to find available escape sequences in UNIX shell programming? ( Like \n, \c etc,. in C or C++) Iam generating one report using one of the script, in that it is very much essential. Regards, LOVE (6 Replies)
Discussion started by: Love
6 Replies

2. UNIX for Advanced & Expert Users

Deal with binary sequences

Hello, I have come across the necessity for me to deal with binary sequences and I had a few questions. 1- Does any UNIX scripting language provide any tool or command for converting text data to binary sequences? Example of binary sequence: "0x97 0x93 0x85 0x40 0xd5 0xd6 0xd7" 2- If I want... (2 Replies)
Discussion started by: Indalecio
2 Replies

3. Programming

Trigraph sequences

Hi, i have read trigraph sequence in The C99 Draft (N869, 18 January, 1999) printf("Eh???/n"); will produce printf("Eh?\n"); what does that mean? i tried that but i am getting the same output i.e Eh???/n. what actually these tri graph characters are? any idea why ,when and... (1 Reply)
Discussion started by: MrUser
1 Replies

4. Shell Programming and Scripting

trimming sequences

My file looks like this: But I would like to 'trim' all sequences to the same lenght 32 characters, keeping intact all the identifier (>GHXCZCC01AJ8CJ) Would it be possible to use awk to perform this task? (2 Replies)
Discussion started by: Xterra
2 Replies

5. Shell Programming and Scripting

Removing specific sequences from file

My file looks like this But I need to remove the entry with the identifier >Reference1 along with the entire sequence. Thus, I will end up having the following file Thanks in advance! (2 Replies)
Discussion started by: Xterra
2 Replies

6. Shell Programming and Scripting

Deleting sequences based on character frequency

This is what I would like to accomplish, I have an input file (file A) that consist of thousands of sequence elements with the same number of characters (length), each headed by a free text header starting with the chevron ‘>' character followed by the ID (all different IDs with different lenghts)... (9 Replies)
Discussion started by: Xterra
9 Replies

7. Shell Programming and Scripting

Removing repeates sequences

Hai, How to remove the repeated 'Chr's in different sequences. In the given example, Chr19 is repeated in two samples with the same number i.e. +52245923. How to remove one of the entry in any of the samples and to give the range for each Chr which is -20 for minimum range value and +120 for... (1 Reply)
Discussion started by: hravisankar
1 Replies

8. AIX

High Runqueue (R) LOW CPU LOW I/O Low Network Low memory usage

Hello All I have a system running AIX 61 shared uncapped partition (with 11 physical processors, 24 Virtual 72GB of Memory) . The output from NMON, vmstat show a high run queue (60+) for continous periods of time intervals, but NO paging, relatively low I/o (6000) , CPU % is 40, Low network.... (9 Replies)
Discussion started by: IL-Malti
9 Replies

9. Shell Programming and Scripting

Escape Sequences

Hi Gurus, Escape sequences \n, \t, \b, \t, \033(1m are not working. I just practiced these escape sequences. It worked first. Later its not working. Also the command - echo inside the script editor shows as shaded by a color. Before that echo inside the script editor wont show like this.... (4 Replies)
Discussion started by: GaneshAnanth
4 Replies

10. Shell Programming and Scripting

Removing duplicate sequences and modifying a text file

Hi. I've tried several different programs to try and solve this problem, but none of them seem to have done exactly what I want (and I need the file in a very specific format). I have a large file of DNA sequences in a multifasta file like this, with around 15 000 genes: ... (2 Replies)
Discussion started by: 4galaxy7
2 Replies
mlib_SignalMelCepstral_F32(3MLIB)			    mediaLib Library Functions				 mlib_SignalMelCepstral_F32(3MLIB)

NAME
mlib_SignalMelCepstral_F32 - perform cepstral analysis in mel frequency scale SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalMelCepstral_F32(mlib_f32 *cepst, const mlib_f32 *signal, void *state); DESCRIPTION
The mlib_SignalMelCepstral_F32() function performs cepstral analysis in mel frequency scale. The first two steps of mel scale cepstral analysis is the same as in general cepstral anaysis. After the logarithm of the spectrum magni- tude is obtained, it is converted into mel frequency scale before the inverse Fourier transform. +-----------+ +-----------+ | Linear | | Inverse | ... ------>| to |------->| Fourier |-----> X'(k) | Mel Scale | X''(m) | Transform | c(n) +-----------+ +-----------+ where X'(k) is defined in linear frequency scale and X''(m) is defined in mel frequency scale. The mel frequency scale is defined as following. freq_mel = melmul * LOG10(1 + freq_linear / meldiv) where freq_mel is the frequency in mel scale, freq_linear is the frequency in linear scale, melmul is the multiplying factor, muldiv is the dividing factor. Optionally, a bank of band pass filters in linear frequency scale can be used below the bank of band pass filters in mel frequency scale, as shown below in linear frequency scale. 0 f1 f2 f3 fp fp+1 fp+2 fp+3 fp+q |---|---|---| ... |---|----|-----| ... | ... -> freq where fp = melbgn, fp+q = melend, p = nlinear, q = nmel; the filters number 1 to p are defined in linear frequency scale which have equal bandwidth in linear frequency scale; the filters number p+1 to p+q are defined in mel frequency scale which have equal bandwidth in mel frequency scale and increasing bandwidth in linear frequency scale. See Digital Signal Processing by Alan V. Oppenheim and Ronald W. Schafer, Prentice Hall, 1974. See Fundamentals of Speech Recognition by Lawrence Rabiner and Biing-Hwang Juang, Prentice Hall, 1993. PARAMETERS
The function takes the following arguments: cepst The cepstral coefficients. signal The input signal vector. state Pointer to the internal state structure. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalMelCepstralInit_F32(3MLIB), mlib_SignalMelCepstralFree_F32(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_SignalMelCepstral_F32(3MLIB)
All times are GMT -4. The time now is 09:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy