fq | jq for binary formats - tool, language and decoders for working with binary and text formats | JSON Processing library

 by   wader Go Version: v0.6.0 License: Non-SPDX

kandi X-RAY | fq Summary

kandi X-RAY | fq Summary

fq is a Go library typically used in Utilities, JSON Processing applications. fq has no bugs, it has no vulnerabilities and it has medium support. However fq has a Non-SPDX License. You can download it from GitHub.

Tool, language and decoders for working with binary data. fq is inspired by the well known jq tool and language and allows you to work with binary formats the same way you would using jq. In addition it can also present data similar to a hex viewer, transform, slice and concatenate binary data, supports nested formats and has an interactive REPL with auto-completion. It was originally designed to query, inspect and debug codecs and metadata in media files and containers like mp4, flac, mp3, jpeg. But has since been extended to support a variety of formats like executables, packet captures including TCP reassembly and serialization formats like ASN1 BER, Avro, CBOR, protobuf and a lot more. In summary it aims to be something like jq, hexdump, dd and gdb combined into one.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fq has a medium active ecosystem.
              It has 8482 star(s) with 186 fork(s). There are 46 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 28 open issues and 30 have been closed. On average issues are closed in 16 days. There are 18 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fq is v0.6.0

            kandi-Quality Quality

              fq has 0 bugs and 0 code smells.

            kandi-Security Security

              fq has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              fq code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              fq has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              fq releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 45620 lines of code, 3575 functions and 260 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fq
            Get all kandi verified functions for this library.

            fq Key Features

            No Key Features are available at this moment for fq.

            fq Examples and Code Snippets

            No Code Snippets are available at this moment for fq.

            Community Discussions

            QUESTION

            Nextflow: Missing output file(s) expected by process
            Asked 2022-Mar-09 at 10:46

            I'm currently making a start on using Nextflow to develop a bioinformatics pipeline. Below, I've created a params.files variable which contains my FASTQ files, and then input this into fasta_files channel. The process trimming and its scripts takes this channel as the input, and then ideally, I would output all the $sample".trimmed.fq.gz into the output channel, trimmed_channel. However, when I run this script, I get the following error:

            Missing output file(s) `trimmed_files` expected by process `trimming` (1)

            The nextflow script I'm trying to run is:

            ...

            ANSWER

            Answered 2022-Mar-09 at 06:14

            Nextflow does not export the variable trimmed_files to its own scope unless you tell it to do so using the env output qualifier, however doing it that way would not be very idiomatic.

            Since you know the pattern of your output files ("FASTQ/*_trimmed.fq.gz"), simply pass that pattern as output:

            path "FASTQ/*_trimmed.fq.gz" into trimmed_channel

            Some things you do, but probably want to avoid:

            • Changing directory inside your NF process, don't do this, it entirely breaks the whole concept of nextflow's /work folder setup.
            • Write a bash loop inside a NF process, if you set up your channels correctly there should only be 1 task per spawned process.

            Source https://stackoverflow.com/questions/71380347

            QUESTION

            How to loop over multiple folders to concatenate FastQ files?
            Asked 2022-Feb-24 at 09:21

            I have received multiple fastq.gz files from Illumina Sequencing for 100 samples. But all the fastq.gz files for the respective samples are in separate folders according to the sample ID. Moreover, I have multiple (8-16) R1.fastq.gz and R2.fastq.gz files for one sample. So, I used the following code for concatenating all the R1.fastq.gz and R2.fastq.gz into a single R1.fastq.gz and R2.fastq.gz.

            ...

            ANSWER

            Answered 2022-Feb-24 at 09:21

            Based on the provided file structure, would you please try:

            Source https://stackoverflow.com/questions/71243293

            QUESTION

            Bash for loop containing python script
            Asked 2022-Feb-09 at 14:08

            New here!

            I'm trying to loop a python script in bash that gets stats from fastq files. I want it to loop through all the fastq files in a directory and save the outputs in a text file. Ideally don't want to edit the python script

            This is the script that works when I'm not looping it:

            ...

            ANSWER

            Answered 2022-Feb-09 at 14:08

            Like this if you want all results in a single file:

            Source https://stackoverflow.com/questions/71050620

            QUESTION

            Nextflow combine by regex match
            Asked 2022-Feb-09 at 09:44

            I have a tuple channel containing entries like:

            ...

            ANSWER

            Answered 2022-Feb-09 at 09:44

            I tend to avoid using the each qualifier like this because of this recommendation in the docs:

            If you need to repeat the execution of a process over n-tuple of elements instead a simple values or files, create a channel combining the input values as needed to trigger the process execution multiple times. In this regard, see the combine, cross and phase operators.

            I don't actually think there's a way to join channels using a regex, but what you can do is use the combine operator to produce the Cartesian product of the items emitted by two channels. And if you supply the by parameter, you can combine the items that share a common matching key. For example, untested:

            Source https://stackoverflow.com/questions/71041137

            QUESTION

            Match-zero-or-more operator in nextflow glob
            Asked 2022-Jan-31 at 14:08

            I am trying to create a robust glob pattern that will match most of the different naming conventions used for fastq files we receive. However, the version of nextflow I am using (20.10.0) on the HPC doesn't seem to accept what I've written.

            Here are some examples of file names:

            ...

            ANSWER

            Answered 2022-Jan-31 at 14:08

            The following glob pattern seems to match some of the more common FASTQ filenames:

            Source https://stackoverflow.com/questions/70900653

            QUESTION

            Running parallel based on variables from file in bash
            Asked 2022-Jan-27 at 12:29

            I've been trying to run a while-loop in parallel for a work that takes days.

            I've seen other answers where parallel was implemented within a while-loop, but for that case it does work in blocks, where the next job only works after all previous jobs finished.

            This is the code, which reproduced the two columns of the CSV file:

            ...

            ANSWER

            Answered 2022-Jan-27 at 12:29
            cat <<_EOF > samples.csv
            a2,b2
            a3,b3
            a4,b4
            _EOF
            
            cat samples.csv | parallel --colsep , echo column 1 = {1} column 2 = {2}
            

            Source https://stackoverflow.com/questions/70869442

            QUESTION

            Looping over pairs of files
            Asked 2022-Jan-08 at 17:18

            Hello I need to iterate over pairs of files and do something with them.

            For example I have 4 files which are named AA2234_1.fastq.gz AA2234_2.fastq.gz AA3945_1.fastq.gz AA3945_2.fastq.gz

            As you can propably tell the pairs are AA2234_1.fastq.gz <-> AA2234_2.fastq.gz and AA3945_1.fastq.gz <-> AA3945_2.fastq.gz (they share the name before _ sign)

            I have a command with syntax looking like this:

            initialize_of_command file1 file2 output_a output_b output_c output_d parameteres

            I want this script to find the number of files with fastq.gz extension in a directory, divide them by 2 to find number of pairs then match the pairs together using probably regex (maybe to two variables) and execute this command for each pair once.

            I have no idea how to pair up those files using regex and how to iterate over the pairs so the scripts knows through which pairs it have already iterated.

            Here is my unfinished script:

            ...

            ANSWER

            Answered 2022-Jan-08 at 02:50

            One way to iterate over pairs of arguments:

            Source https://stackoverflow.com/questions/70629122

            QUESTION

            Concatenate files from list of files in specific cases
            Asked 2022-Jan-08 at 14:56

            I have a list of file names in a file called data.tsv. Each row corresponds to the same sample ID and there is a potential of up to 8 files per ID. I need to merge files that end in "_1.[variable extension]" and "_2.[variable extension].

            Data below, however stackover flow coverts tabs to spaces - should be tab delimited:

            ...

            ANSWER

            Answered 2022-Jan-08 at 14:56

            Fixed all your script and added comments everywhere, so you can understand how it works in the details:

            Source https://stackoverflow.com/questions/70632421

            QUESTION

            Snakemake Error: No values given for wildcard
            Asked 2022-Jan-04 at 04:45

            This is a follow-up of a previous question about using a Python dictionary to generate a list of files to include as input for a single step. In this case, I'm interested in merging BAM files for a single sample that have been generated by mapping FASTQ files from multiple runs.

            I am running into an error in my rule combine_bams only for a single sample:

            ...

            ANSWER

            Answered 2022-Jan-04 at 03:10

            In rule combine_bams, when using lambda expression you will need to provide the values of all {} wildcards. Right now there is only run information provided. One way to fix this is to include kwarg allow_missing=True to expand:

            Source https://stackoverflow.com/questions/70573159

            QUESTION

            Using STAR shared memory module in Snakemake for sequential alignment tasks
            Asked 2021-Nov-11 at 08:55

            I'm writing a Snakemake pipeline for scRNAseq sequence processing which uses STAR as the alignment tool.

            Loading genome index into the memory for each alignment job is very time-consuming. Since I have a lot of memory at my disposal, I figure that it is feasible to use the "shared memory" module from STAR. With it I can load the genome into the memory and keep it there until all the jobs are done.

            With shell this is very easy to achieve, for example here.

            But chianing it in a Snakemake pipeline seems a non-trivial task, especially that the STAR "shared memory" module doesn't require any input or output anything. For example, I tried:

            ...

            ANSWER

            Answered 2021-Nov-11 at 08:55

            the STAR "shared memory" module doesn't require any input or output anything

            I'm not familiar with STAR and the shared memory option, but the issue about input/output can be easily resolved using dummy, flag files that signal a step is done. E.g.:

            Source https://stackoverflow.com/questions/69894230

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fq

            Use one of the methods listed below or download release for your platform. Unarchive it and move the executable to PATH etc.
            Make sure you have go 1.17 or later installed.

            Support

            aac_frame, adts, adts_frame, apev2, ar, asn1_ber, av1_ccr, av1_frame, av1_obu, avc_annexb, avc_au, avc_dcr, avc_nalu, avc_pps, avc_sei, avc_sps, avro_ocf, bencode, bsd_loopback_frame, bson, bzip2, cbor, dns, dns_tcp, elf, ether8023_frame, exif, flac, flac_frame, flac_metadatablock, flac_metadatablocks, flac_picture, flac_streaminfo, gif, gzip, hevc_annexb, hevc_au, hevc_dcr, hevc_nalu, icc_profile, icmp, id3v1, id3v11, id3v2, ipv4_packet, jpeg, json, macho, matroska, mp3, mp3_frame, mp4, mpeg_asc, mpeg_es, mpeg_pes, mpeg_pes_packet, mpeg_spu, mpeg_ts, msgpack, ogg, ogg_page, opus_packet, pcap, pcapng, png, protobuf, protobuf_widevine, pssh_playready, raw, sll2_packet, sll_packet, tar, tcp_segment, tiff, udp_datagram, vorbis_comment, vorbis_packet, vp8_frame, vp9_cfm, vp9_frame, vpx_ccr, wav, webp, xing, zip. For details see formats.md.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/wader/fq.git

          • CLI

            gh repo clone wader/fq

          • sshUrl

            git@github.com:wader/fq.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular JSON Processing Libraries

            json

            by nlohmann

            fastjson

            by alibaba

            jq

            by stedolan

            gson

            by google

            normalizr

            by paularmstrong

            Try Top Libraries by wader

            ydls

            by waderGo

            postfix-relay

            by waderShell

            bump

            by waderGo

            gormstore

            by waderGo

            ansisvg

            by waderGo