Search Results

Search: Posts Made By: Homa
1,762
Posted By Homa
Oh, thanks, but now, there is another problem, in...
Oh, thanks, but now, there is another problem, in my actual file, the content of each of the headers is longer than one line, for example:

>ENSGALG00000014675|ENSGALT00000023647|1|1603|1605...
1,762
Posted By Homa
Ok, I added the -F awk -F "|" 'FNR == NR...
Ok, I added the -F

awk -F "|" 'FNR == NR {a[$1]++} FNR < NR {if ( $1 in a ) print $0}' filetwo fileone

and it works but it only prints the headers and not the content, that is the sequence of...
1,762
Posted By Homa
Matching two files with special field separator
Hello,

I have a file with such structure:

>ENSGALG00000000011|ENSGALT00000000012|57|1123|1125
AACTGTGTGTTTTTT
>ENSGALG00000000012|ENSGALT00000000013|57|1145|1155
AAAAAAGGTCCTGTGTGC...
1,684
Posted By Homa
Adding values of a column based on another column
Hello,

I have a data such as this:

ENSGALG00000000189 329 G A 4 2 0
ENSGALG00000000189 518 T C 5 1 0
ENSGALG00000000189 1104 G A 5 1 0
ENSGALG00000000187 3687 G T 5 1 0
ENSGALG00000000187...
1,597
Posted By Homa
Oops, sorry for posting this, I found my mistake:...
Oops, sorry for posting this, I found my mistake:

awk '{count[$1]++} END{for (genes in count) { print genes, count[genes]}}' file
1,597
Posted By Homa
Counting the number of element in each column
Hello,

I have a file as follows:

ENSGALG00000000189
ENSGALG00000000189
ENSGALG00000000189
ENSGALG00000000215 ...
861
Posted By Homa
Counting elements in each record
Hello,

I have a file such as below:

0 0 . . 0 0
0 0 0 0 0 0
1 1 1 1 1 1
1 1 1 1 1 1
0 0 0 1 0 1I want to count...
1,448
Posted By Homa
Work with huge Zipped files
Hello dear members,

I have one general and one specific question which I will be very grateful if you could help me with them. Let's start with my general question:

1. I am working on cluster...
760
Posted By Homa
Question about awk
Hello,

I am puzzled, I am learning awk from the book "effective awk programming".

there is this very simple piece of code in the beginning of the book:
$ awk "BEGIN { print \"Don't Panic!\"...
7,550
Posted By Homa
Sorting mixed numbers and letters
Hello,

I have a file such as this:
chr1
chr2
chr1
chr2
chr3
chr10
chr4
chr5
chrz
chr1AI want to sort it, I use this command:
sort -k1 -th -n testfilebut I get this output, how can I...
948
Posted By Homa
Comparing the minimum values of a character in lines
Hello,

I have files as follows:

ACTGCCCTG
ACCGGCTCC
ACAAATTTC
ACCCGGGTTI want to do the following:
I want to find certain strings in each line, for example CT and TT. Then I want the script...
1,352
Posted By Homa
Python: find the minimum in all rows
I am using Biopython to process an alignment in fasta format. I need to slice the sequences where there is the first stop codon. So I divided my alignment in codons and found the stop.
I then found...
1,021
Posted By Homa
Creating duplicates in awk
Hi,

I am using Ubuntu 12.04

I have a file as following:

KHO123
KHO245
KHO456
.
.
.I want to add a second column of characters to my file but I want to write a script to make this...
1,020
Posted By Homa
Running a script over a series of files
Hi,

I want to run a script over a series of files with the names :

Sample_1.sorted.bam
Sample_2.sorted.bam
Sample_3.sorted.bam

How can I specify it in my script. Thanks a lot in advance.
724
Posted By Homa
Shell scripting
Hello,

I have this code to submit a job to cluster in a genomic analysis.

I can't fully understand the first lines of the code:

ref=$1
read1=$2
read1=${read1#*/}
read=${read1%_*_*}
...
1,062
Posted By Homa
Thanks alot for your explanations. I am using...
Thanks alot for your explanations. I am using Shell in Ubuntu 12.04.
I have already finished the task I needed to do with this script but as I have not written it, I could not understand it well but...
1,062
Posted By Homa
Shell question
Hi,

I have this piece of code but I can not understand it in details and it is difficult to find in net. What is the function of the $, type, d and prefix here?

This script wants to get each...
905
Posted By Homa
Matching two files with awk
Hello,

I have two files as follow:
AFFY_ID RS_ID CHROMOSOME POS_START POS_END ALLELE1 ALLELE2
SNP_A-1780283 rs17011450 chr4 127630275 127630276 C T
SNP_A-1780285 rs6919430 chr6 90919464...
3,626
Posted By Homa
Indeed, but my real file has about 1000 rows and...
Indeed, but my real file has about 1000 rows and more than 400, 000 columns, I have found this:
{
col2[$1] = col2[$1] $2
col3[$1] = col3[$1] $3
col4[$1] = col4[$1] $4
}

END {

...
3,626
Posted By Homa
Merging rows in awk
Hello,

I have a data format as follows:

Ind1 0 1 2
Ind1 0 2 1
Ind2 1 1 0
Ind2 2 2 0

I want to use AWK to have this output:

Ind1 00 12 21
Ind2 12 12 00

That is to merge each...
1,084
Posted By Homa
Help with awk sorting with different values
Hello,

I have a file as follows:

BTA Pos KLD

4 79.7011 5.7711028907

4 79.6231 5.7083918219

5 20.9112 4.5559494707

5 58.0002 3.4423546273

6 ...
3,272
Posted By Homa
oh yes you are right, thank you very much!
oh yes you are right, thank you very much!
1,614
Posted By Homa
This was so nice of you to correct my code. Thank...
This was so nice of you to correct my code. Thank you very much for it.
3,272
Posted By Homa
Great, thanks a lot!
Great, thanks a lot!
1,614
Posted By Homa
That works very well, thank you!
That works very well, thank you!
Showing results 1 to 25 of 67

 
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy