Search Results

Search: Posts Made By: fadista
2,017
Posted By fadista
Multiply value by row
Hi

I would like to know how can I multiply the value of column three to columns 4-end of file

example of input file:
rs1000012 AK8 2 0.05 0.05 1 0 0
rs10000154 ...
1,723
Posted By fadista
Then the output is: 1.6 id2 11.3
Then the output is:

1.6
id2 11.3
1,723
Posted By fadista
Thank you, but I only get the mean scores in the...
Thank you, but I only get the mean scores in the output, not the IDs.
1,723
Posted By fadista
If the genomic regions in file 2 overlap any of...
If the genomic regions in file 2 overlap any of the genomic regions of file 1, average the scores by ID

file1 fields explanation:
chromosome startPosition endPosition ID

file2 fields...
1,723
Posted By fadista
Mean score value by ID over a defined genomic region
Hi,

I would like to know how can I get a mean score value by ID over a defined genomic region. Here it is an example:

file1

12 100 103 id1
12 110 112 id1
12 200 203 id2


file2

12...
2,478
Posted By fadista
sed for all columns
Hi,

I would like to know how can I use sed in all columns of a file tab separated.

Example of input file:
0/0:0:1,0,0 0/2:0:0,2,0

Desired output file:
1,0 0,2
2,352
Posted By fadista
Thanks but this only works if you have two...
Thanks but this only works if you have two columns. What should I change in your script to be able to output all the columns, lets say of a file with 20 columns, in which the column I want to shuffle...
2,352
Posted By fadista
Sure. File1 Column1 Column2 a 1 b 1...
Sure.

File1

Column1 Column2
a 1
b 1
c 1
d 2
e 2
f 2

Desired file is to have the values of column 2 shuffled like:
a 2
b 1
c 1
d 1
e 2
f 2
2,352
Posted By fadista
Reshuffle values in a column
Hi,

I would like to know how can I reshuffle values in a column from a text file.

I know that shuf command does the trick of reshuffling values but how to substitute lets say the original...
1,621
Posted By fadista
Merge files
Hi,

I would like to know how can I merge files based on their coordinates, but mantaining the score of each file in the output file like:

Note: 1st column is for chromosome, 2nd for start, 3rd...
2,085
Posted By fadista
overlapped genomic coordinates
Hi,

I would like to know how can I get the ID of a feature if its genomic coordinates overlap the coordinates of another file. Example:

Get the 4th column (ID) of this file1:
chr1 10 100 gene1...
1,453
Posted By fadista
Thanks a lot! It works.
Thanks a lot! It works.
1,453
Posted By fadista
Length of a segment based on coordinates
Hi,

I would like to have the length of a segment based on coordinates of its parts.

Example input file:
chr11 genes_good3.gtf aggregate_gene 1 100 gene1
chr11 genes_good3.gtf exonic_part 1 60...
2,230
Posted By fadista
Thanks a lot. It works!
Thanks a lot. It works!
2,230
Posted By fadista
sum values based on ID
Hi,

I would like to be able to sum up the counts of a column by the ID of another column. Example (although the actual file I have has thousands of IDs):

Input file:

A1BG-AS1:001 3...
2,030
Posted By fadista
Looping over a file to count common fields from another file
Hi,

I would like to know how can I get the number of rows in file1 that:
- the 1st and 2nd field should be the same (text)
- the 3rd field should be less or equal (numeric)
when comparing to...
10,042
Posted By fadista
how to select lines from one file based on another file
Hi,

I would like to know how can I select lines of one file based on a common ID column from another file (keeping the order of the second file).

Example of file1:
ID A B C D
1-30 1 2 3
5-60...
2,694
Posted By fadista
Thanks a lot to everyone! I am also interested...
Thanks a lot to everyone!
I am also interested in getting a similar output but now only output the lines where the number of zeros in each row (starting from column 3) is equal or less than 5% of...
2,694
Posted By fadista
Thanks for the reply. Example Input file: ...
Thanks for the reply.

Example Input file:

a b 0 0 0 0 0
a d 0 1 0 0 1.5
d r 0 0 0 0 0

Desired output file:

a d 0 1 0 0 1.5
2,694
Posted By fadista
delete rows with a criteria
Hi,

I would like to know how can I delete rows of a text file if from the 3rd column onwards there is only zeros?

Thanks in advance
2,106
Posted By fadista
Thanks a lot!
Thanks a lot!
2,106
Posted By fadista
output only some lines of a file
Hi,

I would like to know how can I output only the lines of a file (file1) corresponding to the numbers present in another file (file2).

Example file1:
aetteg
bgrhet
cgegeg
ddfggg
...
2,739
Posted By fadista
Thanks for the fast reply. Since I am a UNIX...
Thanks for the fast reply. Since I am a UNIX newbie, can you write the full command?

Thanks again.

---------- Post updated at 11:48 AM ---------- Previous update was at 11:46 AM ----------
...
2,739
Posted By fadista
find positions of a letter in a text file
Hi,

I would like to know how can I get all the positions of a letter, let say letter C in a text file.

sample input file:
hcck
pgog
hlhhc

desired output file:
2
3
13

Many thanks!
4,517
Posted By fadista
arithmetic operations on 1 column of a file
Hi,

I have a file with thousands of lines like this:

Chr1 477515 . ACCCC ACCC 17.7 . INDEL;DP=17;AF1=1;CI95=0.5,1;DP4=0,1,0,3;MQ=32;PV4=1,0.036,1,1
Chr1 481987 . ...
Showing results 1 to 25 of 38

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