Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • fchatonnet
    replied
    Dear Sebastian,

    I see several issues in your post:

    - first of all if you want to remove a entire read from a fastq file, you have to remove 4 lines and not only 2, because the base qualities are also encoded in the file (see here for a description of the fastq format: FASTQ format - Wikipedia​).

    -
    Code:
     gzip -c file
    will compress your file (and keep the original file uncompressed) rather than decompress it, you may want to use
    Code:
     gzip -d file
    or
    Code:
     gunzip file
    to decompress a file. That may be the reason why you get the "compressed data--format violated" error.

    - The 'sed' command should be written with single quotation mark like this:
    Code:
     sed '45500973,45500974d'
    So your editing command might be
    Code:
     sed '45500973,45500976' file.fastq
    - finally, you pipe your 'sed' result directly into a compressed file, with no use of gzip, which will not provide you with a compressed file.
    I would rather perform the decompression and compression steps separately from the editing as the piping can sometimes lead to issues.

    Hope that'll help and good luck!

    Leave a comment:


  • Sebastian_Quezada_R
    started a topic How can I delete these lines?

    How can I delete these lines?

    Hi guys =) I'm sorry if this is a repeat but I haven't been able to find an answer using the search field or google.

    I am trying to edit a fastq file that has a corrupt line. The read in question is VH00362:5:AAAV5KTHV:1:1210:64850:6869 where the read is just a massive repeat – not the expected 110bp. I am trying to remove two lines from this file and asking around I've been told to use `sed` as in

    ```gzip -c file.fastq.gz | sed "45500973,45500974d" > new.fastq.gz```

    but when I run `wc -l ` to check the number of lines the results are incoherent, as if it has deleted much more than the two lines I asked. Another issue that I'm seeing with this file is that every time I run `gzip` I get a `invalid compressed data--format violated` error, which tells me the file is corrupted but I'm doing my best to salvage whatever I can from the file as it is an irreplaceable sample.

    Is there another way to simply delete these two lines? Any tool or command you could recommend? Any help is deeply appreciated.​

Latest Articles

Collapse

  • seqadmin
    Advancing Precision Medicine for Rare Diseases in Children
    by seqadmin




    Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
    12-16-2024, 07:57 AM
  • seqadmin
    Recent Advances in Sequencing Technologies
    by seqadmin



    Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

    Long-Read Sequencing
    Long-read sequencing has seen remarkable advancements,...
    12-02-2024, 01:49 PM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, 12-17-2024, 10:28 AM
0 responses
23 views
0 likes
Last Post seqadmin  
Started by seqadmin, 12-13-2024, 08:24 AM
0 responses
42 views
0 likes
Last Post seqadmin  
Started by seqadmin, 12-12-2024, 07:41 AM
0 responses
28 views
0 likes
Last Post seqadmin  
Started by seqadmin, 12-11-2024, 07:45 AM
0 responses
42 views
0 likes
Last Post seqadmin  
Working...
X