06-17-2010
Frequency of each character
My bad, l guess I did not express myself correctly. From my previous example:
Quote:
> Seq1 Freq 1
ATC
> Seq2 Freq 33
ACG
> Seq3 Freq 33
TTG
> Seq4 Freq 33
TCC
The first character in the first sequence is A, and the frequency of that sequence is 1%. However, A is also present in the same position (1) in sequence #2 and the frequency of that second sequence is 33%. Therefore, the 'global' frequency of A in the data set in position 1 is = 34%, hence it should be kept. When you do the same for the second and thrid position you can see that the global frequency for T (second character) and C (third character) from Sequence 1, are =34%, and therfore that should be enought to keep the entire sequence.
I hope I have better explain what I would like to accomplish.
Thanks one more time!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a big log file i want to delete all characters (between 350th to 450th characters) starting at 350th character position to 450th character position.
please advice or sample code. (6 Replies)
Discussion started by: rajeshorpu
6 Replies
2. Shell Programming and Scripting
My files look like this
And I need to cut the sequences at the last "A" found in the following 'pattern' -highlighted for easier identification, the pattern is the actual file is not highlighted.
The expected result should look like this
Thus, all the sequences would end with AGCCCTA... (2 Replies)
Discussion started by: Xterra
2 Replies
3. Shell Programming and Scripting
If I have a file with the following information
And I would like to remove all the sequences with Freq less than 3, so I end up having the following file:
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. (3 Replies)
Discussion started by: Xterra
3 Replies
4. Shell Programming and Scripting
My file looks something like this
Wnat I need is to look for the Reference sequence (">Reference1") and based on the length of that sequence trim all the entries in that file. So, the rersulting file will contain all sequences with the same length, like this
Thus, all sequences will keep... (5 Replies)
Discussion started by: Xterra
5 Replies
5. Shell Programming and Scripting
Hi,
I have a file with more than 28000 records and it looks like below..
>mm10_refflat_ABCD range=chr1:1234567-2345678
tgtgcacactacacatgactagtacatgactagac....so on
>mm10_refflat_BCD range=chr1:3234567-4545678...
tgtgcacactacacatgactagtatgtgcacactacacatgactagta
.
.
.
.
.
so on
... (2 Replies)
Discussion started by: Diya123
2 Replies
6. Shell Programming and Scripting
I have two files with thousands of sequences of different lengths. infile1 contains the actual sequences and infile2 the scores for each A, T, G and C in infile1. Something like this:
infile1:
>HZVJKYI01ECH5R
TTGATGTGCCAGCTGCCGTTGGTGTGCCAA
>HZVJKYI01AQWJ8
GGATATGATGATGAACTGGTTTGGCACACC... (4 Replies)
Discussion started by: Xterra
4 Replies
7. Shell Programming and Scripting
I have to remove sequences from a file based on the distance value. I am attaching the file containing the distances (Distance.xls)
The second file looks something like this:
Sequences.txt
>Sample1 Freq 59
ggatatgatgatgaactggt
>Sample1 Freq 54
ggatatgatgttgaactggt
>Sample1 Freq 44... (2 Replies)
Discussion started by: Xterra
2 Replies
8. Shell Programming and Scripting
I have a list of IDs in file1 and a list of sequences in file2. I can print sequences from file2, but I'm asking for help in printing the sequences in the same order as the IDs appear in file1.
file1:
EN_comp12952_c0_seq3:367-1668
ES_comp17168_c1_seq6:1-864
EN_comp13395_c3_seq14:231-1088... (5 Replies)
Discussion started by: pathunkathunk
5 Replies
9. UNIX for Dummies Questions & Answers
I have files with hundreds of sequences with frequency values reported as "Freq X" and missing characters represented by a dash ("-"), something like this
>39sample Freq 4
TAGATGTGCCCGTGGGTTTCCCGTCAACACCGGATAGTAGCAGCACTA
>22sample Freq 15
T-GATGTCGTGGGTTTCCCGTCAACACCGGCAAATAGTAGCAGCACTA... (12 Replies)
Discussion started by: Xterra
12 Replies
10. Shell Programming and Scripting
I have this file:
>ID1
AA
>ID2
TTTTTT
>ID-3
AAAAAAAAA
>ID4
TTTTTTGGAGATCAGTAGCAGATGACAG-GGGGG-TGCACCCC
Add I am trying to use this script to output sequences longer than 15 characters:
sed -r '/^>/N;{/^.{,15}$/d}'
The desire output would be this:
>ID4... (8 Replies)
Discussion started by: Xterra
8 Replies
LEARN ABOUT FREEBSD
clocks
CLOCKS(7) BSD Miscellaneous Information Manual CLOCKS(7)
NAME
clocks -- various system timers
SYNOPSIS
#include <time.h>
DESCRIPTION
HZ is not part of the application interface in BSD.
There are many different real and virtual (timekeeping) clocks with different frequencies:
o The scheduling clock. This is a real clock with frequency that happens to be 100. It is not available to applications.
o The statistics clock. This is a real clock with frequency that happens to be 128. It is not directly available to applications.
o The clock reported by clock(3). This is a virtual clock with a frequency that happens to be 128. Its actual frequency is given by the
macro CLOCKS_PER_SEC. Note that CLOCKS_PER_SEC may be floating point. Do not use clock(3) in new programs under FreeBSD. It is feeble
compared with getrusage(2). It is provided for ANSI conformance. It is implemented by calling getrusage(2) and throwing away informa-
tion and resolution.
o The clock reported by times(3). This is a virtual clock with a frequency that happens to be 128. Its actual frequency is given by the
macro CLK_TCK (deprecated; do not use) and by sysconf(_SC_CLK_TCK) and by sysctl(3). Note that its frequency may be different from
CLOCKS_PER_SEC. Do not use times(3) in new programs under FreeBSD. It is feeble compared with gettimeofday(2) together with
getrusage(2). It is provided for POSIX conformance. It is implemented by calling gettimeofday(2) and getrusage(2) and throwing away
information and resolution.
o The profiling clock. This is a real clock with frequency 1024. It is used mainly by moncontrol(3), kgmon(8) and gprof(1). Applications
should determine its actual frequency using sysctl(3) or by reading it from the header in the profiling data file.
o The mc146818a clock. This is a real clock with a nominal frequency of 32768. It is divided down to give the statistic clock and the
profiling clock. It is not available to applications.
o The microseconds clock. This is a virtual clock with frequency 1000000. It is used for most timekeeping in BSD and is exported to
applications in getrusage(2), gettimeofday(2), select(2), getitimer(2), etc. This is the clock that should normally be used by BSD
applications.
o The i8254 clock. This is a real clock/timer with a nominal frequency of 1193182. It has three independent time counters to be used. It
is divided down to give the scheduling clock. It is not available to applications.
o The TSC clock (64-bit register) on fifth-generation or later x86 systems. This is a real clock with a frequency that is equivalent to
the number of cycles per second of the CPU(s). Its frequency can be found using the machdep.tsc_freq sysctl, if it is available. It is
used to interpolate between values of the scheduling clock. It can be accessed using the PMIOTSTAMP request of perfmon(4).
o The ACPI clock. This is a real clock/timer with a nominal frequency of 3579545. It is accessed via a 24 or 32 bit register. Unlike the
TSC clock, it maintains a constant tick rate even when the CPU sleeps or its clock rate changes. It is not available to applications.
Summary: if HZ is not 1000000 then the application is probably using the wrong clock.
SEE ALSO
gprof(1), clock_gettime(2), getitimer(2), getrusage(2), gettimeofday(2), select(2), clock(3), moncontrol(3), times(3)
AUTHORS
This manual page was written by Jorg Wunsch after a description posted by Bruce Evans.
BSD
January 18, 2008 BSD