Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.08 seconds.
Search: Posts Made By: cmccabe
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 3
Views: 255
Posted By cmccabe
Thank you both very much :).

Thank you both very much :).
Forum: Shell Programming and Scripting Linux 2 Weeks Ago
Replies: 3
Views: 255
Posted By cmccabe
awk to create separate files but not include specific field in output

I am trying to use awk to create (in this example) 3 seperate text file from the unique id in $1 in file, if it starts with the pattern aa. The contents of each row is used to populate each text file...
Forum: Shell Programming and Scripting Linux 04-18-2018
Replies: 2
Views: 130
Posted By cmccabe
Thank you very much :).

Thank you very much :).
Forum: Shell Programming and Scripting Linux 04-17-2018
Replies: 2
Views: 130
Posted By cmccabe
awk to adjust text and count based on value in field

The below awk executes as is and produces the current output. It isvery close but what Ican not seem to do is add the -exon..., the ... portion comes from $1 and the _exon is static and will never...
Forum: Shell Programming and Scripting Linux 03-28-2018
Replies: 2
Views: 235
Posted By cmccabe
Thank you very much :).

Thank you very much :).
Forum: Shell Programming and Scripting Linux 03-22-2018
Replies: 2
Views: 235
Posted By cmccabe
awk to update file based on match in 3 fields using two files

Trying to use awk to store the value of $5 in file1 in array x. That array x is then used to search $4 of file1 to find aa match (I use x[2] to skip the header in file1). Since $4 can have multiple...
Forum: Shell Programming and Scripting Linux 02-22-2018
Replies: 2
Views: 319
Posted By cmccabe
Thank you very much :)

Thank you very much :)
Forum: Shell Programming and Scripting Linux 02-22-2018
Replies: 2
Views: 308
Posted By cmccabe
Thank you very much :).

Thank you very much :).
Forum: Shell Programming and Scripting Linux 02-20-2018
Replies: 2
Views: 308
Posted By cmccabe
awk to update file with sum of matching fields in another file

In the awk below I am trying to add a penalty to a score to each matching $1 in file2 based on the sum of $3+$4 (variable TL) from file1. Then the $4 value in file1 is divided by TL and multiplied by...
Forum: Shell Programming and Scripting Linux 02-19-2018
Replies: 2
Views: 319
Posted By cmccabe
awk to calculate difference of split and sum the difference

In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13.
I think the awk will do that, but added comments. What I am...
Forum: Shell Programming and Scripting Linux 02-19-2018
Replies: 6
Views: 338
Posted By cmccabe
Thank you very much for your help :).

Thank you very much for your help :).
Forum: Shell Programming and Scripting Linux 02-15-2018
Replies: 6
Views: 338
Posted By cmccabe
Is meant to print either overlap or missing in $7...

Is meant to print either overlap or missing in $7 depending on if the condition's are met.

If I understand the comments correctly:


awk '
BEGIN { FS=OFS="\t" } #...
Forum: Shell Programming and Scripting Linux 02-15-2018
Replies: 6
Views: 338
Posted By cmccabe
if[A] ~ array) is ensuring, or is supposed to,...

if[A] ~ array) is ensuring, or is supposed to, match $4 in file1 with the array split from file2. So using the first value RPS19 as an example, only those lines in file2 with RPS19 are used. Thank...
Forum: Shell Programming and Scripting Linux 02-15-2018
Replies: 6
Views: 338
Posted By cmccabe
awk to print text in field if match and range is met

In the awk below I am trying to match the value in $4 of file1 with the split value from $4 in file2. I store the value of $4 in file1 in A and the split value (using the _ for the split) in array. I...
Forum: Shell Programming and Scripting Linux 01-29-2018
Replies: 3
Views: 370
Posted By cmccabe
Thank you both very much :)

Thank you both very much :)
Forum: Shell Programming and Scripting Linux 01-27-2018
Replies: 3
Views: 370
Posted By cmccabe
awk to change contents of field based on condition in same file

In the awk below I am trying to copy the entire contents of $6 there may be multiple values seperated by a ;, to $8, if $8 is . (lines 1 and 3 are examples). If that condition $8 is not . (line2 is...
Forum: Shell Programming and Scripting Linux 01-23-2018
Replies: 4
Views: 363
Posted By cmccabe
Thank you very much rdrtx1, that works perfect...

Thank you very much rdrtx1, that works perfect :).

Don Cragun your are correct in that:



I forgot that I changed the
sub(/$/, ":p=", NM[i]) # add :p. to end off each NM[i] before the to...
Forum: Shell Programming and Scripting Linux 01-23-2018
Replies: 4
Views: 363
Posted By cmccabe
awk to add text to matching pattern in field

In the awk I am trying to add :p.=? to the end of each $9 that matches the pattern NM_. The below executes andis close but I can not seem to figure out why the :p.=? repeats in the split as in the...
Forum: Shell Programming and Scripting Linux 01-14-2018
Replies: 0
Views: 320
Posted By cmccabe
awk move select fields to match file prefix in two directories

In the awk below I am trying to use the file1 as a match to file2. In file2 the contents of $5,&6,and $7 (always tab-delimited) and are copied to the output under the header Quality metrics. The...
Forum: Shell Programming and Scripting Linux 01-09-2018
Replies: 5
Views: 387
Posted By cmccabe
I am sorry I did not understand what you were...

I am sorry I did not understand what you were asking fully until now.

I am only testing on two tsv files that get converted that get processed by the loop and the output is 2 text files.

I will...
Forum: Shell Programming and Scripting Linux 01-09-2018
Replies: 5
Views: 387
Posted By cmccabe
I apologize and hopefully the below will help: ...

I apologize and hopefully the below will help:

each input file is a tsv of 40 columns, the below is an example of multiple lines (I only show 4 columns, as all 40 are the same or close to it and...
Forum: Shell Programming and Scripting Linux 01-09-2018
Replies: 5
Views: 387
Posted By cmccabe
Bash repeating lines for some files but not all

The bash below executes and seems to work fine on those files in which . However on those files where there is no additional CNV detected that line repeats multiple times
instead of only once. I...
Forum: Shell Programming and Scripting Linux 01-09-2018
Replies: 4
Views: 380
Posted By cmccabe
Thank you very much :).

Thank you very much :).
Forum: Shell Programming and Scripting Linux 01-08-2018
Replies: 4
Views: 380
Posted By cmccabe
Thank you very much for your help :).

Thank you very much for your help :).
Forum: Shell Programming and Scripting Linux 01-04-2018
Replies: 4
Views: 380
Posted By cmccabe
awk to print lines that meet conditions and have value in another file

I am trying to use awk to print lines that satisfy either of the two conditions below:

condition 1: $2 equals CNV and the split of $3, the value in red, is greater than or equal to 4. ---- this...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 04:12 PM.