Search Results

Search: Posts Made By: nans
2,128
Posted By nans
Hello R.Singh, I haven't come anywhere...
Hello R.Singh,


I haven't come anywhere near but this is what I have so far which is terribly wrong


awk '{a[FNR]=a[FNR]+$5;b[FNR]++;}END{for(i in a){print i,a[i]/b[i]}}' file.txt > output
I...
2,128
Posted By nans
Average of columns
I have files that have the following columns


chr pos ref alt sample 1 sample 2 sample 3
chr2 179644035 G A 1,107 0,1 58,67
chr7 151945167 G T ...
5,682
Posted By nans
Submit a qsub script SGE
Hello,
I'm working on a SGE cluster and trying to echo the variables passed to the qsub command.



My script is as follows


#!/bin/bash
#$ -V
#$ -cwd
#$ -pe make 10

if [ !...
2,558
Posted By nans
Apologies, that was a typo, when formatting the...
Apologies, that was a typo, when formatting the thread
2,558
Posted By nans
Calculate average from a given set of keys and values
Hello,
I am writing a script which expects as its input a hash with student names as the keys and marks as the values. The script then returns array of average marks for student scored 60-70, 70-80,...
Forum: Programming 07-03-2019
11,190
Posted By nans
Calculate ratios for each pair in a given file
Hello,
My input file looks like this


#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Individual1 Individual2 ...
3,026
Posted By nans
very silly of me ! :o Thank you !
very silly of me ! :o

Thank you !
3,026
Posted By nans
Read a file with decimal numbers in bash
Hello,
I have the following script

while read id fraction
do
sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam
done < fraction.txt
where fraction.txt has two...
1,663
Posted By nans
Thank you very much, this works well.
Thank you very much, this works well.
1,663
Posted By nans
Compare and replace two columns from two files
Hello,

I have two text tab delimited files

File 1 has 30 columns. I am pasting only first 9

Chr Position Ref Alt Score Gene HGVS_C HGVS_P Coding_Consequence dbSNP...
2,021
Posted By nans
This works. thank you
This works. thank you
2,021
Posted By nans
yes, Apart from the header missing, the code...
yes, Apart from the header missing, the code generates output files. Thank you.
2,021
Posted By nans
Hello, I meant tab-delimited file, sorry should...
Hello,
I meant tab-delimited file, sorry should be been specific.


The code works by including all the columns, but again the header is missing in all the files.


Also, a very minor...
2,021
Posted By nans
Thank you @rbatte1. The file is not too big....
Thank you @rbatte1.

The file is not too big. Not expecting the results.txt to have more than 200 lines.
It does create separate files but the header and the first two columns are missing from the...
2,021
Posted By nans
Extract line from file and save as new file.
Hello,
I have a tab-file "result.txt "that looks like this
CNV.ID Sample Correlation N.comp Start.b End.b CNV.type N.exons BF Reads.expected Reads.observed ...
1,137
Posted By nans
Thank you so much. Both the solutions worked!
Thank you so much. Both the solutions worked!
1,137
Posted By nans
Merging and Adding colon to columns
Hello,
I have a tab delim file that looks like this

CHROM POS ID REF ALT ID HGVS_C HGVS_P
1 17319011 rs2076603 G A NM_022089.3,NM_001141973.2,NM_001141974.2 ...
2,746
Posted By nans
Reading from file bash command
Hello, I have a file in the following format


id sample platform R1 R2 gene1 gene2 gene3
1 abc llumina R1_001.fastq.gz R2_001.fastq.gz apoe prnpp asp
2 def ...
3,892
Posted By nans
Revisiting this post. Can we condition the...
Revisiting this post. Can we condition the command to say,
go through first two columns in each of the three files and if it matches (assuming the files are not in the same order) or even present...
3,892
Posted By nans
Both the solutions worked perfect! Thank you
Both the solutions worked perfect! Thank you
3,892
Posted By nans
Average of a columns from three files
hello, I have three files in the following order

==> File1 <==
1 20977000 20977000 A C 1.00 0,15 15 45
1 115829313 115829313 G A 0.500 6,7 13 99
...
10,525
Posted By nans
When i try to open the file in ReadHat, this is...
When i try to open the file in ReadHat, this is what it says

NBN@myComp:/mnt/NB/pipeline$less -S config.csv
"config.csv" may be a binary file. See it anyway?So I can continue to use iconv ?
10,525
Posted By nans
Conversion of Binary csv file
Hello,
I have a binary csv file that was created on 'Red Hat Enterprise Linux Server release 6.6'. Now we have transferred all files on Ubuntu 16.04.2 LTS/xenial
On opening the file in Ubuntu,...
Forum: Programming 07-05-2017
19,651
Posted By nans
Got it! Thank you!
Got it! Thank you!
Forum: Programming 07-05-2017
19,651
Posted By nans
Great. I've changed it to 'while cell_pos.value:'...
Great. I've changed it to 'while cell_pos.value:' and this works just perfect for my script.
Out of curiosity if I wanted to say go until all the cells E, G, and F are empty, how would I go about...
Showing results 1 to 25 of 91

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