Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: demis001
  • Content: Threads
  • Order by date
  1. demis001

    Reading file to array

    $XXXX00000182183 A B C D 2336458 0.38052728 0.47743206 0.7575053 -0.6718711 2336459 0.28057157 0.15925342 1.6066561 -0.6718711 2336464 0.51131811 0.09128078 2.0090009 -0.6718711 2336466 -0.24900861 0.13113013 -1.7475722 -0.6718711 2336469 0.38724031 0.06652635...
  2. demis001

    Overlap filter in between two file

    Need help, data1 1 59851 59880 CATTCTAGTGTAAAGTTTTAGATCTTATAT 1 59881 59910 AACTGTGAGATTAATCTCAGATAATGACAC 1 59911 59940 AAAATATAGTGAAGTTGGTAAGTTATTTAG 1 59941 59970 TAAAGCTCATGAAAATTGTGCCCTCCATTC 1 59971 60000 CCATATAATTTAGTAATTGTCTAGGAACTT 1...
  3. demis001

    sum the value in each column for repeat sequence under $1

    I want to add respective column for repeat item on $1. If there is no repeat sequence on $1, I want the exact count in each col. Please would you help me guys! ---------------------------------------------------------- data Name a b c d e f g h GGGACGG 2 0 7 10 2 0 4 0 GGGAGGG 0 0 4 26 8 3 0 0...
  4. demis001

    Format file

    Would you please help me in formating the folling file. File looks like the folloing. I want to capture, The "AC" and ID row and print $2 and $3 if the file contain "hsa_" in column three. See the result file I want at the end of this file. -----------data---------------- AC MIPF0000001 ID...
  5. demis001

    search and count

    Hi guys, Is there easy way to searcha and count the following. File1 TCGTCTGCCGTTTTTT TCTCTGAGGGTCGGT File2 TCGTCTGCCGTTTTTT TCGTCTGCCGTTTTTTCCTTG TCGTCTGCCGTTTTTTCCTTTTCATCTTAAAAAAAA TCGTCTGCCGTTTTTTCGTTGGCAACAATAAAGTCT TCGTCTGCCGTTTTTTG TCGTCTGCCGTTTTTTG TCGTCTGCCGTTTTTTG...
  6. demis001

    None overlap lines

    Is there any way I can negate the following line. I want to print none-overlap lines between two files. Rather than "in a", I want "not in a" awk 'NR==FNR{a[$2","$3","$6]=$0;next}$2","$3","$6 in a{print a[$2","$3","$6]"\t"$0}' $* Thanks D
  7. demis001

    Multiline concatination

    How I can concatinate >1 AAAAAAAAAAA BBBBBBBBBBBBB CCCCCCCCCCCC To get >1 AAAAAAAAAABBBBBBBBBCCCCCCCCCCC I have tried the following and it only capture the first line and stops. awk '/^>/ {print; "\t"; getline; print}' $*
  8. demis001

    awk monks, I am back with question

    I want format the following data 1 177921 N 1 123822 G 1 116756 P 1 131946 m 2 1779 N 2 1238 G 2 1167 P 2 1319 m 3 177921 N 3 123822 G 3 116756 m I want: header1 N G P M 1 177921 123822 116756 131946 2 1779 1238 1167 1319 3 177921...
  9. demis001

    Pattern not recoginized when set as multiline

    I am getting " unterminated pattern error" while I excute the script. If I write the pattern as single line on vi editor it will work but the script will be ugly. $1~/^A|B|c|d|e|f|g|h/ THIS WILL WORK WITH OUT ANY PROBLEM If I wrote the same line as: $1~/^A|B |C|D |E|F |G|h/ I...
  10. demis001

    Match two file using grep and awk

    I want to match two file using grep and awk. Here is Data1 and Data2. I want to get overlap only if the following is true: $1(Data1)==$1(Data2) && $3(Data1)==4(Data2) Data1: I929_79_46226_x388 GCAAAGCACACGGCCTGC 10 I929_79_145232_x1 TAGCAGCGGGAACAGTTC 11 Data2: I929_79_145232_x1...
  11. demis001

    excuting saved awk script from command line

    I have a problem of feeding input file to saved awk script. I want to save awk scirpt to a file and feed the file name from command line but do not work. test.awk --------------------------------------------- awk "{$1~/query|seq/}{a[$1]=$2}{print a["query"]"\t"a["seq"]"\t"}'...
  12. demis001

    Search string in other file

    I know perl way to search a string inside other file. Is there an easy awk way to search a string in side second file? Example: Data1 1 TGAGGTAGTAGGTTGTATAGTT 2 CTATACAATCTACTGTCTTTC Exaple: Data2 >1 TGAGGTAGTAGGTTGTATAGTT >2 TGAGGTAGTAGGTTGTATAGTT >3 TGAGGTAGTAGGTTGTATAGTT >4...
  13. demis001

    The or logic didn't work on bash

    These two line didn't work on my bash! awk '{gsub(/\r/,"")}substr($0,2,15)~/\./||/^A{15}/||/^G{15}/||/^T{15}/||/^C{15}/||length($0)<14{next}1' gcb110_adaptor_removed.txt _-------------------------------------------------------- awk 'index(substr($1, 2, 10), ".")==0||index(substr($1, 1, 15)...
  14. demis001

    Recognizing empty line using &quot;&quot;

    The following script works when I have changed to ==1 but will not exclude when I changed to ==0. The other problem is that I want to recognize and exclude lines with shorter reads less than 14 character using index(substr($1, 1, 14), " ")==0 but will not work awk 'index(substr($1, 2, 10)...
  15. demis001

    Practical question!!!

    I want give each line a unique id. Here is the inpute data: TGAGGTATTATGTTCGAT 1 GGGGGCGACTCTGGGATG 3 CGGAGCGGGCTTCTCTTC 1 AGGGGGATGGTGGAAAAA 1 TGGCTCAGGGCAGAAGGA 2 TACTACAGGGTAGAACC 49 I want to give each line an id looks like this >xxx_1_x1 TGAGGTATTATGTTCGAT >xxx_2_x3...
  16. demis001

    Tired of Excel filter

    Hi Guys, I hope I will get solution from awk, I am tired of opening and filtering the sequence per mellion line. I want to discard a sequence if more than two . at the begening( meaning character 1-10) Data: GCGGAA.GATCATTA GCGA.GGCA.GCCG.CC. GCTCCGGGA.GGCTCGGG CTCC...A.GGCTGGGA...
  17. demis001

    character count

    Is there any simple single line command to count character in awk? I want some thing like =len(A1) in excel. input data: AAAAGCTGGGTTGAGAGGGCGA AAAAGCTGGGTTGAGAGGGCGA AAAAGCTGGGTTGAGAGGGCGA AAAAGCTGGGTTGAGAGGGCGA AAAAGCTGGGTTGAGAGGGCGA AAAAGCTGGGTTGAGAGGGCGA AAAAGCTGGGTTGAGAGGGCGA...
  18. demis001

    Concatination problem

    How can I combine the following inpute sequence as sigle line separated by tab? data_input: >cel-miR-49 MIMAT0000020 Caenorhabditis elegans miR-49 AAGCACCACGAGAAGCUGCAGA >cel-miR-50 MIMAT0000021 Caenorhabditis elegans miR-50 UGAUAUGUCUGGUAUUCUUGGG I have tried: awk '/^>/ {print,"\t"...
  19. demis001

    Please awk expert!!!! Filter sequence

    I want to filter fastafile using awk. The inpute file looks like Input file: >cel-miR-49 MIMAT0000020 Caenorhabditis elegans miR-49 AAGCACCACGAGAAGCUGCAGA >cel-miR-50 MIMAT0000021 Caenorhabditis elegans miR-50 UGAUAUGUCUGGUAUUCUUGGG >cel-miR-51 MIMAT0000022 Caenorhabditis elegans miR-51...
  20. demis001

    More Help, New to awk!!!!

    PHV wrote the following script to process the inputfile at the end of this post(it will work for single line process, the problem I have is to extract the last part) awk ' BEGIN{print "loop_beg\tmature_arm\tpri_id"} $1~/^(loop_beg|mature_arm)$/{a[$1]=$2} $1=="pri_id"{print...

Part and Inventory Search

Back
Top