Search Results

Search: Posts Made By: nengcheng
5,260
Posted By nengcheng
Thank you RudiC . That's a cool solution, which...
Thank you RudiC . That's a cool solution, which is also suitable for more complex situations.
5,260
Posted By nengcheng
How to split one long column into multiple rows with 3 each ?
I have a large csv dataset like this : A value1
A value2
A value3
B value1
B value2
B value3
C value1
C value2
C value3

what I expected output is :A value1 value2 value3...
2,526
Posted By nengcheng
Thank you Singh, I will try it next time. ...
Thank you Singh, I will try it next time.

--- Post updated at 03:55 AM ---

Thank you, nezabudka it also worked for me.
2,526
Posted By nengcheng
How to repeat a character in a field if it's a single character?
I have a csv dataset like this :

C,rs18768
G,rs13785
GA,rs1065
G,rs1801279
T,rs9274407
A,rs730012

I'm thinking of use like awk, sed to covert the dataset to this format: (if it's two...
1,207
Posted By nengcheng
Great, that's an elegant solution.
Great, that's an elegant solution.
1,207
Posted By nengcheng
Thank you all, Yoda and RavinderSingh13' s code...
Thank you all, Yoda and RavinderSingh13' s code works for me.

---------- Post updated at 01:42 PM ---------- Previous update was at 01:32 PM ----------



Thank you, Yoda, this works great. ...
1,207
Posted By nengcheng
Round values only when it's numerics
Hi, all

I have a field in a file looks like this(hundreds of lines):


inf
1.24101
-0.185947
-0.349179
inf
0.126597
0.240142
-0.12031And what I expect is:

inf
1.241
-0.186
-0.349...
3,030
Posted By nengcheng
Thanks for your advice, I understand what you...
Thanks for your advice, I understand what you mean. Frankly speaking, I majoring biology and need to analyze some datasets. If I used the scripts in my paper, maybe I could list your name as...
3,030
Posted By nengcheng
Ok, I searched Google and tried python: ...
Ok, I searched Google and tried python:
import itertools
paralog = ['a','b','c','d']
for L in range(2, len(paralog)-1):
for subset in itertools.combinations(paralog, L):
print(subset)
...
3,030
Posted By nengcheng
How to generate all combinations of group lists at the same time?
Hi, everyone

I have a group lists like this (more lines are omitted:
a b c d
E F G H
....

I want to generate all combinations of two elements in each group line. What I expected is this:
a...
962
Posted By nengcheng
wow, that's great, very appreciated. :)
wow, that's great, very appreciated. :)
962
Posted By nengcheng
How to print lines that have values in certain columns ?
Hi, everyone
I have a dataset like this:
A B C D
A C
C D E
F G H
F D K
Y
X A
K K C Gsome of columns have no values in each line. I want to print all lines that have 1/2/3/4...
886
Posted By nengcheng
great, thanks very much.
great, thanks very much.
886
Posted By nengcheng
Find all matched lines from two files
Hello, everyone

I have two files like this:

File 1: A
B
C
D
E
FFile 2:A B 1
A C 2
A K 3
B A 4
D E 3
W X 2
A B 2I want to print all lines (file2) that...
882
Posted By nengcheng
How to remove the lines with this pattern?
Hello everyone,
I have a sample data like this:
Glyma.10G051100 Glyma.02G036000 89.91 228 23 0 1 228 1 228 1e-78 294
Glyma.10G051100 Glyma.09G023700 87.28 228 29 0 1 228 1 228 1e-68 261...
1,235
Posted By nengcheng
I upload a very small sample size. 19 in total. ...
I upload a very small sample size. 19 in total. The command gives the 11, 6 , respectively. I don't know what's wrong. Maybe something wrong with my format?


oh, I realized that I didn't remove...
1,235
Posted By nengcheng
How could I upload my sample? It's a large...
How could I upload my sample? It's a large dateset, more than 10 Mb.
1,235
Posted By nengcheng
Thank you for the information. The question is...
Thank you for the information. The question is that the number of matched and unmatched lines are not equal to the total lines. I don't know where is wrong. I think the problem is that many A-B,...
1,235
Posted By nengcheng
How to remove matched rows from my file?
Hello,

I am new beginner, and just got help from this forum. The command line is :awk '($1, $2) in x {
print x[$1, $2]
print
delete x[$1, $2]
next
}
{ x[$2, $1] = $0...
712
Posted By nengcheng
That's great, thank you. could I ask you one...
That's great, thank you. could I ask you one more question? I am a beginner. so, How do I output the rest lines from this dataset? I mean reverse selection and output.
712
Posted By nengcheng
Selecting lines based on the value in the 3rd column.
Hello,
I have a sample data like this:
A1 B1 100.00
B1 A1 100.00
A2 B2 90.80
B2 A2 90.80
A3 B3 99.07
B3 A3 99.07
A4 B4 99.00
B4 A4 99.00
A5 B5 97.13
B5 A5 99.53
.
....
1,240
Posted By nengcheng
yeah, it's not the same as my sample dataset. but...
yeah, it's not the same as my sample dataset. but the format is similar and it works perfect for my dataset as I applied it into my dataset. Output is like this:
Glyma.10G001700 Glyma.10G179600...
1,240
Posted By nengcheng
Thanks very much! I add more details. so far, I...
Thanks very much! I add more details. so far, I think your answer gives the result I expected. [1] 173372
I am beginner, one more question, How do I output the rest of the lines from my file.
1,240
Posted By nengcheng
How to select rows that have opposite values (A vs B, or B vs A) on first two columns?
I have a dateset like this:
Gly1 Gly2 2 1 0
Gly3 Gly4 3 4 5
Gly3 Gly5 1 3 2
Gly2 Gly1 3 6 2
Gly4 Gly3 2 2 1
Gly6 Gly4 4 2 1what I expected is:

Gly1 Gly2 2 1 0...
1,490
Posted By nengcheng
Great, Thank you so much.:b: You know, It's...
Great, Thank you so much.:b: You know, It's very difficult for a beginner like to me to figure out even it's a very simple command.
Showing results 1 to 25 of 26

 

Featured Tech Videos

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