Home Man
Search
Today's Posts
Register

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: cmccabe
Forum: Red Hat 4 Days Ago
Replies: 7
Views: 144
Posted By Scott
Well, if you modify PATH from the command line it...

Well, if you modify PATH from the command line it will be lost when you end your current session. To make it stick, you need to modify the path in one of your login scripts (e.g. .bashrc or...
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 169
Posted By Don Cragun
You have /usr/sbin in your PATH setting twice. ...

You have /usr/sbin in your PATH setting twice. Having any directory in PATH more than once will slow down access to any utilities found in any directory after the second occurrence of that...
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 169
Posted By jim mcnamara
Check /etc/profile and /etc/environment files for...

Check /etc/profile and /etc/environment files for the statement that sets the PATH variable. Be sure /bin and /usr/bin are included.

Otherwise, if whatever went wrong may have originated there,...
Forum: Red Hat 4 Days Ago
Replies: 7
Views: 144
Posted By Scott
Perhaps I misread your first post. Did you...

Perhaps I misread your first post. Did you actually edit your .bashrc to add the path to gatk-4.0.10.1, or just change it on the command line?

(second, probably silly question - are you using...
Forum: Red Hat 4 Days Ago
Replies: 7
Views: 144
Posted By Scott
I don't see where you added...

I don't see where you added /usr/bin/gatk-4.0.10.1 to your PATH in the .bashrc. I won't ask why it's in /usr/ and not /usr/local/, though :)
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 169
Posted By hicksd8
Hmmmm.......the first thing to do is to find out...

Hmmmm.......the first thing to do is to find out whether the 'ls' command executable exists or whether your O/S installation is damaged.

Ask the system for the location of the 'ls' command by...
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 169
Posted By Don Cragun
On many UNIX, Linux, and BSD systems, one would...

On many UNIX, Linux, and BSD systems, one would expect the standard commands to be located in /bin or /usr/bin (neither of which are included in the directories in your PATH setting).
Forum: Shell Programming and Scripting 08-22-2018
Replies: 10
Views: 355
Posted By Aia
cat example.fasta >hg19_ncbiRefSeq_Gene...

cat example.fasta
>hg19_ncbiRefSeq_Gene range=chr2:166911123-166911301 5'pad=25 3'pad=25 strand=- repeatMasking=none
aaattttttggatgcttgttttcagATACACCTTCACAGGAATATATACT...
Forum: Shell Programming and Scripting 08-22-2018
Replies: 10
Views: 355
Posted By Aia
Does the sequence starts at 0 or does it start at...

Does the sequence starts at 0 or does it start at 1?
Could you post the sequence that produces that result?


I suppose I am not understanding. I cannot see how the above example AAAAAA or aaaaaa...
Forum: Shell Programming and Scripting 08-20-2018
Replies: 10
Views: 355
Posted By Aia
Maybe #!/usr/bin/perl use strict; use...

Maybe

#!/usr/bin/perl
use strict;
use warnings;

my @fasta = ();
my @m_results = ();
my @regexs;
my @rows = ('a', 't', 'c', 'g');
Forum: Shell Programming and Scripting 08-20-2018
Replies: 10
Views: 355
Posted By Aia
Two changes, then. Make the subroutine...

Two changes, then. Make the subroutine range_match() to return matches and create a display() subroutine.

#!/usr/bin/perl
use strict;
use warnings;

my @fasta = ();
my @m_results = ();
...
Forum: Shell Programming and Scripting 08-20-2018
Replies: 10
Views: 355
Posted By Aia
In case that it is useful. #!/usr/bin/perl ...

In case that it is useful.

#!/usr/bin/perl
use strict;
use warnings;

my @fasta = ();
while(<>) {
chomp;
if(/^>/){
Forum: Shell Programming and Scripting 08-01-2018
Replies: 5
Views: 291
Posted By rbatte1
It might also be worth doing sha1sum on each file...

It might also be worth doing sha1sum on each file to compare the derived checksum value. If that is not available, try using sum which is not so detailed but is more widely available.

Perhaps the...
Forum: Shell Programming and Scripting 08-01-2018
Replies: 5
Views: 291
Posted By Don Cragun
How did you "copy the same lines in file to a new...

How did you "copy the same lines in file to a new document"?

What does ls -l original_file new_document show?

What does diff original_file new_document show?
Forum: Shell Programming and Scripting 08-01-2018
Replies: 5
Views: 291
Posted By jim mcnamara
What does the file command show file...

What does the file command show

file filename
Forum: Shell Programming and Scripting 07-26-2017
Replies: 1
Views: 421
Posted By RavinderSingh13
Hello cmccabe, Could you please try...

Hello cmccabe,

Could you please try following and let me know if this helps you.

awk 'FNR==NR{
a[$1,$2,$7]=$1 FS $2 FS $6 FS $7;
next
}
...
Forum: Shell Programming and Scripting 06-22-2018
Replies: 4
Views: 489
Posted By murugesandins
116268178 + 4 needs to be 116268182 ? Having...

116268178 + 4 needs to be 116268182 ?
Having doubt on requirement?


/bin/awk 'BEGIN {
FS=OFS="\t";
}
match($NF,$(NF-1)) {
$3+=RLENGTH;
$3=$3OFS$3;
Forum: Shell Programming and Scripting 06-21-2018
Replies: 4
Views: 489
Posted By RavinderSingh13
Hello cmccabe, Could you please try...

Hello cmccabe,

Could you please try following and let me know if this helps you.


awk 'BEGIN{FS=OFS="\t"} match($NF,$(NF-1)){$3+=RLENGTH-1;$3=$3 OFS $3} 1' Input_file
Thanks,
R. Singh
Forum: Shell Programming and Scripting 06-21-2018
Replies: 4
Views: 489
Posted By Scrutinizer
See: match(s, r) the ...

See:
match(s, r)
the position in s where the regular expression r occurs, or 0 if it does not. The variables RSTART and RLENGTH are set
to the position and...
Forum: Shell Programming and Scripting 06-16-2018
Replies: 4
Views: 408
Posted By Scrutinizer
Hi try this instead: awk ' { ...

Hi try this instead:
awk '
{
gsub(/^[0-9_]+[_(]|[)(_][_)(0-9.]+$/,x,$4)
print "chr" $1, $2, $3, "chr" $1 ":" $2 "-" $3, $4
}
' FS='\t' OFS='\t' file
Forum: Shell Programming and Scripting 06-14-2018
Replies: 4
Views: 408
Posted By Scrutinizer
Try: awk ' { split($4,F,/_/) ...

Try:
awk '
{
split($4,F,/_/)
if(split(F[3],G,/[)(]/)) {
if(G[2]~/[[:alpha:]]/)
p=G[2]
else
p=G[1]
}
Forum: Shell Programming and Scripting 05-09-2018
Replies: 3
Views: 358
Posted By Don Cragun
The following seems to do what I think you want;...

The following seems to do what I think you want; which assumes you don't want extra whitespace characters added to the ends of your output lines, that you want <tab> delimited output from your <tab>...
Forum: Shell Programming and Scripting 05-09-2018
Replies: 3
Views: 358
Posted By Chubler_XL
Try this: awk -F'\t' ' /^aa/{ ...

Try this:

awk -F'\t' '
/^aa/{ # if line starts with aa
if(f) close(f) # close already open file
f=sprintf($1"%d.txt",++n) # pre...
Forum: Shell Programming and Scripting 04-17-2018
Replies: 2
Views: 195
Posted By vgersh99
BEGIN { FS=OFS="\t" suf="_exon" } { ...

BEGIN {
FS=OFS="\t"
suf="_exon"
}
{
sf=""
len1=split($10,s1,",")
split($11,s2,",")
for (i=1;i<len1;i++)
sf=sf $3 ":" s1[i] "-" s2[i] suf (($4=="+")?i:len1-i) ","
Forum: Shell Programming and Scripting 03-25-2018
Replies: 2
Views: 302
Posted By Chubler_XL
Few things here. 1. Process file2 first so...

Few things here.

1. Process file2 first so you can have a[$5,$6,$9] populated when processing files2
2. Why store x[NR] when you are only interested in x[2] I replaced with FNR==2 {x=$5} to only...
Showing results 1 to 25 of 500

 


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

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password