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
    Non-Coding RNA Research and Technologies
    by seqadmin




    Non-coding RNAs (ncRNAs) do not code for proteins but play important roles in numerous cellular processes including gene silencing, developmental pathways, and more. There are numerous types including microRNA (miRNA), long ncRNA (lncRNA), circular RNA (circRNA), and more. In this article, we discuss innovative ncRNA research and explore recent technological advancements that improve the study of ncRNAs.

    Nobel Prize for MicroRNA Discovery
    This week,...
    10-07-2024, 08:07 AM
  • seqadmin
    Recent Developments in Metagenomics
    by seqadmin





    Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
    09-23-2024, 06:35 AM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, Today, 06:55 AM
0 responses
8 views
0 likes
Last Post seqadmin  
Started by seqadmin, 10-02-2024, 04:51 AM
0 responses
105 views
0 likes
Last Post seqadmin  
Started by seqadmin, 10-01-2024, 07:10 AM
0 responses
113 views
0 likes
Last Post seqadmin  
Started by seqadmin, 09-30-2024, 08:33 AM
1 response
117 views
0 likes
Last Post EmiTom
by EmiTom
 
Working...
X