Search Results

Search: Posts Made By: labrazil
5,417
Posted By labrazil
this is what i made: #!/usr/bin/perl -w ...
this is what i made:

#!/usr/bin/perl -w

#creates a hash and reads in all files in a given directory.
# all files are then read once, inserted into hash and file is closed
#this script will...
2,437
Posted By labrazil
how many spaces are you talking about? you can...
how many spaces are you talking about?
you can use any one of the methods above.

I would try this:

sed 's/ / /' filename

in addition, read through sed manual

man sed
they...
5,417
Posted By labrazil
as the mouse begin to turn in my head, i'm...
as the mouse begin to turn in my head, i'm thinking of using a hash in perl. i'll just dump in the key/value for each row and each file...then just print it out the way i want ;)...
5,417
Posted By labrazil
Anni, as much as I respect what you are trying to...
Anni, as much as I respect what you are trying to do for me, I feel like I'm in a hole with a tiny lit match stick just about to burn out ;). But I'll keep at it :P. I can't promise you I'll have...
62,513
Posted By labrazil
sed 's/,/\t/g' filename see if that helps.
sed 's/,/\t/g' filename


see if that helps.
2,437
Posted By labrazil
I"m not as good as some of the guys here but try...
I"m not as good as some of the guys here but try this

sed 's/-/\//' filename > newfile
5,417
Posted By labrazil
Thanks Anni, I came across this code awk...
Thanks Anni,

I came across this code
awk -v OFS='\t' 'NR == FNR {
_[$1] = $2
next
}
$1 in _ {
$(NF+1) = _[$1]
}
1' 1.txt 2.txt > 3.txt

But two problems with this.
how can I...
5,417
Posted By labrazil
I just tried that, and I forgot to mention that I...
I just tried that, and I forgot to mention that I would like the output to be tab deliminated.
5,417
Posted By labrazil
Thank you for the reply but if I do it that way,...
Thank you for the reply but if I do it that way, it would only join 2 files, how can i do it for all 70 files in one directory?
5,417
Posted By labrazil
Merge 70 files into one data matrix
Hi,
I have a list of 70 files in a directory and I need to merge the content of each file into one big matrix file (71 columns x 3060 rows).

Each file has the following format only two columns...
Forum: Programming 10-01-2008
1,768
Posted By labrazil
selecting rows with specific IDs for downstream analysis
Hi,

I'm working hard on SQL and I came across a hurdle I'm hoping you can help me out with.

I have two tables

table1
headers: chrom start end name score strand

11 9720685 9720721 U0 ...
Forum: Programming 09-30-2008
8,772
Posted By labrazil
Extracting differences between two columns dataset (SQL command)
Hi,

I have a table in my sqlite, here is an example (tab separated)

585 name1 chr1 + 1872 3533 3533 3533 6 1872,2041,2475,2837,3083,3315, ...
10,219
Posted By labrazil
Hi, so I left the C code as is and tested it...
Hi,

so I left the C code as is and tested it among one of my two big files. But when I ran it after running the shell, I got no results.

Here are the two files attached.

I hope to know if...
10,219
Posted By labrazil
Thanks, when i ran the 'wc -l' for both...
Thanks,

when i ran the 'wc -l' for both files, I got 35 and 4 respectfully.

Then I ran the script.

./overlap filea 35 fileb 4

And I got an unexpected result:


I would think that it...
10,219
Posted By labrazil
Hi jim mcnamara, so i spent some time with the...
Hi jim mcnamara,
so i spent some time with the code and i keep getting an error in my results.txt file



I'm using the exact same file i originally posted. Any ideas?
13,752
Posted By labrazil
Thanks cfajohnson. it works. can you explain to...
Thanks cfajohnson. it works. can you explain to me how the parameters work here?
13,752
Posted By labrazil
sorting file based on two or more columns
Hi gang.

I'm using a unix/mac system and i'm trying to sort a file (more than 1,000,000 lines).


chr1 100000965 100001001 -
chr1 100002155 100002191 +
chr1 ...
10,219
Posted By labrazil
ignore my question, i read your statement at the...
ignore my question, i read your statement at the bottom. well looks like i have to learn a new language ;) thank you again for all the help. much appreciate!
10,219
Posted By labrazil
wow thank you so much everyone for the help. i'm...
wow thank you so much everyone for the help. i'm not very familiar with C and so I don't know how to read through it. does the first shell file you made does the same work?
10,219
Posted By labrazil
that was fun, thanks Jean-Pierre! I was...
that was fun, thanks Jean-Pierre!

I was working on the perl by avronius and when using file1 with 4000 lines and file2 with 276,000 lines, it seems to be running on overdrive. the log file is...
10,219
Posted By labrazil
thanks for sorting it out for me :). i'm...
thanks for sorting it out for me :).

i'm getting this error


any idea why ?
10,219
Posted By labrazil
hehe me too :). but where are you referring to? ...
hehe me too :). but where are you referring to?
while (@fileA) #open the file
{
chomp;
@lineFile1Array = split (/\t/,@_); #split the line into temporary array elements
@tempStart =...
10,219
Posted By labrazil
Thank you for this and i've been working on it...
Thank you for this and i've been working on it since you posted it. however, i get compilation errors which i tried to correct but can't seem to get pass this:
10,219
Posted By labrazil
yes that makes sense, if I know how many lines I...
yes that makes sense, if I know how many lines I start with and then infer the yes or nos, then I can simply do a subtraction and get the answers for both.
10,219
Posted By labrazil
thanks for the tip. i'm still not sure how to...
thanks for the tip. i'm still not sure how to organize the script to test it :(.
Showing results 1 to 25 of 60

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