Sorry if this is a super simple issue, but am extremely new to this and am trying to teach myself as I go along. But can someone please help me out?
I have a data file similar to this for many samples, for all chromosomes
I would like to determine the maximum and minimum bp for each chromosome for each sample, and then output the distance between the min and max bp for each chromosome for each sample.
As I am super new to all this, and I have noone to help me, I was wondering if someone here could help me out?
I have so far written this:
And I keep getting the thi following syntax error message
I have no idea what it means - please help? Any advice would be greatly appreciated.
Best
V
Last edited by Franklin52; 08-18-2014 at 11:08 AM..
Reason: Please use code tags
I am writing a shell script that simulates the `wc -w` command without actually using wc itself. My problem is that the script will only read the first line of the file and just keep looping through it. I have tried both while and for loops and got the same result. Can anyone help?
... (1 Reply)
Good morning,
Sir's i would like to ask for help regarding to my awk and loop problem, a script that will check my files a and b then if it will see there was a time below 3am it will echo the file that contains below 3am file, for this example it will redirect the file a to an output.
$ cat a... (3 Replies)
i have a script that will read each line and then grep a particular pattern and do some_stuff. Below the script
while read j
do
q1=0
q1=`$j | grep 'INFO - LPBatch:' | wc -l`
if
then
$j | tr -s " " | cut -d " " -f8,42,43 >> nav1.txt
fi
q2=0
q2=`$j | grep 'INFO - Number of Intervals... (12 Replies)
Hi All,
How to read a file upto last line(End Of Line)
I wrote below program:
cat R2_20060719.610.txt | while read LINE
do
echo "$LINE"
done
above code reading all lines from a file and skipping last line......
is there anything wrong in my code.
Please help me out from this... (20 Replies)
Hi all,
i write a script c shell
set i = 1
while ( $i <= $#array )
echo "$array"
@ i++
end
i want to set it to i = i +2 in that statement . Can anybody help me?
---------- Post updated at 02:46 PM ---------- Previous update was at 02:35 PM ----------
anybody not how to solve it??? (2 Replies)
Hello forum memebers.
can you correct the simple while program.
#! /bin/ksh
count=10
while
do
echo $count
count='expr$count-1'
done
I think it will print 10 to 1 numbers but it running for indefinite times. (2 Replies)
Learning, stumbling! My progress in shell scripting is slow. Now I have this doubt:
I have the following file (users.txt):
AU0909,on
AU0309,off
AU0209,on
AU0109,off
And this file (userson.txt)
AU0909
AU0209
AU0109
AU0309
I just want to set those users on userson.txt to "off" in... (14 Replies)
I am parsing file for the fields using awk command, first i check 26th field for two characters using substr function if it matches then using for loop on array i search 184th field for 4 chars if it matches then i print the required fields but on execution i get the error, please help...... (5 Replies)
I have written the below PERL script to reprocess messages from a failure queue.
It basically browses all the messages in the failure queue to individual files in a directory and then scans those files to determine the originating queue. The script will then move each message in turn from the... (0 Replies)
Hi,
input:
AAA|1
my script (the function is just an example):
gawk 'BEGIN{FS=OFS="|"}
function repeat(str, n, rep, i){
for(i=1; i<=n; i++)
rep=rep str
return rep
}
{
variable_1=repeat($1,$2)
variable_2=repeat($1,$2+1)
variable_3=repeat($1,$2+3)
... (5 Replies)
Discussion started by: beca123456
5 Replies
LEARN ABOUT OPENSOLARIS
mlib_imageextrema2
mlib_ImageExtrema2(3MLIB) mediaLib Library Functions mlib_ImageExtrema2(3MLIB)NAME
mlib_ImageExtrema2, mlib_ImageExtrema2_Fp - image extrema
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_ImageExtrema2(mlib_s32 *min, mlib_s32 *max,
const mlib_image *img, mlib_s32 xStart, mlib_s32 yStart,
mlib_s32 xPeriod, mlib_s32 yPeriod);
mlib_status mlib_ImageExtrema2_Fp(mlib_d64 *min, mlib_d64 *max,
const mlib_image *img, mlib_s32 xStart, mlib_s32 yStart,
mlib_s32 xPeriod, mlib_s32 yPeriod);
DESCRIPTION
Each of the functions determines the extrema values for each channel in an image, possibly with subsampling.
It uses the following equation:
min[i] = MIN{ img[x][y][i] }
max[i] = MAX{ img[x][y][i] }
where
x = xStart + p*xPeriod; 0 <= p < (w - xStart)/xPeriod
y = yStart + q*yPeriod; 0 <= q < (h - yStart)/yPeriod
PARAMETERS
Each of the functions takes the following arguments:
min Pointer to minimum vector, where length is the number of channels in the image. min[i] contains the minimum of channel i.
max Pointer to maximum vector, where length is the number of channels in the image. max[i] contains the maximum of channel i.
img Pointer to a source image.
xStart Initial X sample coordinate.
yStart Initial Y sample coordinate.
xPeriod X sample rate. xPeriod >= 1.
yPeriod Y sample rate. yPeriod >= 1.
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_ImageExtremaLocations(3MLIB), mlib_ImageMaximum(3MLIB), mlib_ImageMaximum_Fp(3MLIB), mlib_ImageMinimum(3MLIB), mlib_ImageMini-
mum_Fp(3MLIB), attributes(5)SunOS 5.11 2 Mar 2007 mlib_ImageExtrema2(3MLIB)