Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: sajmar
1,819
Posted By sajmar
Dear senhia83 Thank you so much, the awk...
Dear senhia83

Thank you so much, the awk command works exactly perfect. However, the order is important for me. my desire order is based on the second column.
1,819
Posted By sajmar
Find duplicate values in specific column and delete all the duplicate values
Dear folks

I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate...
2,238
Posted By sajmar
Thanks to all the folks for their suggestions. I...
Thanks to all the folks for their suggestions. I am still not meet my requirement. As I said, I have a file with 15000 lines and I want to select 5000 lines for five times. However, in each of these...
2,238
Posted By sajmar
Thank you Corona688 for your suggestion. I only...
Thank you Corona688 for your suggestion. I only present the small example. In my case, I want to randomly choose 5000 lines out of 15000 lines. what should I do for this situation?
2,238
Posted By sajmar
Say, I have this small input file: 1 2 ...
Say, I have this small input file:

1
2
3
4
5
6
7
8
9
10


My desired output is to select three numbers but different each time.

2
4
9
2,238
Posted By sajmar
How to select lines randomly without replacement in UNIX?
Dear Folks

I have one column of 15000 lines and want to select randomly 5000 of them in five different times without replacement. I am aware that command 'shuf' and 'sort -R' could select randomly...
Forum: Programming 12-02-2015
1,386
Posted By sajmar
Thanks to all of the folks that gave their...
Thanks to all of the folks that gave their suggestions.
Forum: Programming 12-02-2015
1,386
Posted By sajmar
How to add one to each row values and keep it after the value in the column?
Dear Folks

Hello

I have a column of numbers, say:

26
79
68


I want to add one to each row value and get this desire column:

26
27
79
80
68
69
2,712
Posted By sajmar
To senhia83: Thanks for your awk script...
To senhia83:

Thanks for your awk script suggestion. But after running the code you mentioned, I did not got my expected result.

If you assume my "datafile" is:

1 2 1 0 2 0 1 0
2 2 2 1 1...
2,712
Posted By sajmar
1.What operating system are you using? Linux ...
1.What operating system are you using?
Linux
2.Your large dataset clearly is not a text file. What type of file is it?
ASCII text
3.What delimits columns in your dataset?
One space delimits...
Forum: Programming 07-05-2015
957
Posted By sajmar
FORTRAN program to extracting column
Dear folks

I have a large data set which contains 400K columns. I decide to select 50K determined columns from the whole 400K columns. Is there any suggested fortran program which could do this...
2,712
Posted By sajmar
Selecting random columns from large dataset in UNIX
Dear folks

I have a large data set which contains 400K columns. I decide to select 50K determined columns from the whole 400K columns. Is there any command in unix which could do this process for...
1,679
Posted By sajmar
Dear Rudic As my first post, it is clear I...
Dear Rudic

As my first post, it is clear I want to join the common id between these two files (file1 and file2). But the point is file2 has id with replication and file1 just have unique number...
1,679
Posted By sajmar
Dear Rudic When I applied your command, I...
Dear Rudic

When I applied your command, I found 1613 common id between file1 and file2. However, file1 has originally 1805 id and file2 has originally 11580 id. because file1 is the master id...
1,679
Posted By sajmar
Dear Rudic I did not bring the whole data...
Dear Rudic

I did not bring the whole data set of file1 and file2 here. That's what you think these two file do not match together. The question is file2 have unique number of id in the second...
1,679
Posted By sajmar
This is file1 (11580 id) ...
This is file1 (11580 id)

gi|358468608|ref|NW_003780270.1| 3935 T C 0 1 1
gi|358468608|ref|NW_003780270.1| 4071 C T 0 1 1
gi|358468608|ref|NW_003780270.1| 4110 C T 0 1 1...
1,679
Posted By sajmar
As I tried to merge the second column of the...
As I tried to merge the second column of the file1 with first column of file2, I was able to run the command perfectly but I have a problem here. My file1 have 11580 id and file2 have 1805 id. the...
1,679
Posted By sajmar
Sorry Scrutinize, if I put you in the wrong way....
Sorry Scrutinize, if I put you in the wrong way. this time the command works well. But If I need to put it inside loop, this code did not work

ls *.geno | while read FN; awk 'NR==FNR{A[$2]=$0;...
1,679
Posted By sajmar
Dear Rudic Thanks for your command. your...
Dear Rudic

Thanks for your command. your command did not give me anything in the output. By the way, if when I have 300 files, I think with this command, I should to run 300 times.
1,679
Posted By sajmar
As I mentioned, I have 300 files in the folders...
As I mentioned, I have 300 files in the folders which are like file2 and they all have the same ending file name which is *.geno . now each of these file have different rows. I want to know how many...
1,679
Posted By sajmar
Thank for your suggestion. I tried those codes...
Thank for your suggestion. I tried those codes But these command will not meet my need.
1,679
Posted By sajmar
How to join one file with multiple files in a directory in UNIX?
Dear folks
Hello

I have a one file called (file1) which the structure looks like this

1 gi|358484521|ref|NW_003764373.1|
1 gi|358484520|ref|NW_003764374.1|
1 ...
1,089
Posted By sajmar
Using loop command in UNIX for converting column to row
Dear folks

I have 300 files which one of them are looking like:

1.SNP
0
0
1
0

I am looking for desire output:

1.SNP 0 0 1 0

I used this below command to run all of the 300 file at...
2,823
Posted By sajmar
Thank you so much Rudic. this command works well.
Thank you so much Rudic. this command works well.
2,823
Posted By sajmar
How to use a loop for multiple files in a folder to run awk command?
Dear folks

I have two data set which there names are "final.map" and "1.geno" and look like this structures:
final.map:
gi|358485511|ref|NC_006088.3| 2044

gi|358485511|ref|NC_006088.3| 2048...
Showing results 1 to 25 of 44

 

Featured Tech Videos

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