Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sed,head and tail dont work? very interesting.

    After some efforts, I found some error from 62107669 to 62107678 line in one fastq file1,
    and from 211806809 to 211806818 line in another fastq file2, so I decided to delete these
    lines.

    I issued the following commands,

    wc -l file1 >>fq.wc
    sed -i '62107669,62107678d' file1
    wc -l file1 >>fq.wc

    wc -l file2 >>fq.wc
    sed -i '211806809,211806818d' file2
    wc -l file2 >>fq.wc

    Unexpected, I got the fq.wc file like this,
    633538931 file1
    633538931 file1

    871708178 file2
    871708168 file2

    Obviously,sed -i didn't work in the file1 but worked well in file2,
    and I am sure for this after manual checking.


    Then I changed my command,
    head -n 62107668 file1 >file.c
    tail -n 571431253 file1 >>file.c
    Unfortunately, it seems that head can run but tail can't.

    Finally, I solved this problem using perl to read and write line by line.

    I am confused why sed and tail failed,is this phenomenon about the big number? But they work well in the file2 which has bigger number lines than file1.
    Any suggestion will be welcome, thanks.
    Last edited by hanifk; 10-07-2011, 08:50 PM.

  • #2
    Works ok for me:


    > seq 1 633538931 > t.tmp
    > wc -l t.tmp
    633538931 t.tmp
    > sed -i '62107669,62107678d' t.tmp
    wc -l t.tmp
    > wc -l t.tmp
    633538921 t.tmp

    So I suspect ... hum ... perhaps you are are on a 32-bit machine. Or perhaps you made a mistake?

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Essential Discoveries and Tools in Epitranscriptomics
      by seqadmin




      The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
      04-22-2024, 07:01 AM
    • seqadmin
      Current Approaches to Protein Sequencing
      by seqadmin


      Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
      04-04-2024, 04:25 PM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Today, 08:47 AM
    0 responses
    10 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-11-2024, 12:08 PM
    0 responses
    60 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-10-2024, 10:19 PM
    0 responses
    57 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-10-2024, 09:21 AM
    0 responses
    53 views
    0 likes
    Last Post seqadmin  
    Working...
    X