I have a folder of fastq file (genomic sequences) and an excel file with barcodes (series of 20 nucleotides) and I want to search all the barcodes in all fastq files and get the exact matches. I did "zgrep -u barcode file1 file2 file3" individually for few barcodes to test and it works but now I want to create a script that does it for me as I have around 200 different barcodes to look for in 10 files. I am not sure how can I incorporate zgrep into a script like this.
I am a microbiologist and new to PowerShell and I have to create a script using zgrep -u
120 Views Asked by INDERPREET SINGH At
1
There are 1 best solutions below
Related Questions in BASH
- How do I recursively find and replace only in files named index.php on Linux webserver?
- Delete the extra space after special character in all the lines of text file
- Calling a python function with options from shell script
- bc: prevent "divide by zero" runtime error on multiple operations
- Multiple commands with find and xargs, also accounting for special characters
- How to split a directory into parts without compressing or archiving?
- concat a lot of files to stdout
- Honoring quotes while reading shell arguments from a file
- No laravel sync folders in homestead vagrant on windows
- Grouping commands in curly braces and piping does not preserve variable
- SWI Prolog pass a goal with non-zero arity through the command line arguments
- Evaluating condition of if statement in awk using a second file
- How to customise bash completion to pick only a custom set of commands?
- Bash regular expression execution hangs on long expressions
- Bitwise OR in bash arguments with square brackets
Related Questions in GREP
- Git > diffs filtered, show only certain changed classes/files
- Sorting unique elements column-wise in a text-file
- grep/sed replace no match with blank space
- find string including quotation marks using grep
- Use grep to extract the value from the file
- Grep string start with . or whitespace
- How to grep a string in a program?
- grep a string to another file
- Getting the first match with grep
- searching through text file in terminal
- how to remove two lines above after we find a match in a file in BASH?
- Match line not containing a pattern in BBEdit with Grep
- Change XML structure
- Using tail -f on a log file with grep in bash script
- git: identify all commits not complying with a pattern
Related Questions in MOBAXTERM
- how to connect to oracle free cloud using mobaxterm?
- How to use Customize syntax highlighting on Mobaxterm
- SSH Selenium Session Crashes on Logout (even with "screen", "nohup" etc)
- mobaXterm copy after grep
- Is there a way to launch a VNC session from the commandline with MobaXTerm?
- How to set ssh server's date time automatically using MobaXTerm at each connection?
- How can I connect to multiple or all the sessions from the quick search results in MobaXterm?
- MobaXterm Python user and password
- How can i fix if pip3 is not working after instalation?
- Reopen terminal at remote path after SSH disconnect
- Mobaxterm: Ctrl key seems locked
- MobaXterm gets stuck on "Please wait while opening file..." dialog
- Is it possible to set MobaXterm for use a bash history in a terminal session?
- How to change Mobaxterm session password
- mobaxterm keyboard shortcut
Related Questions in ZGREP
- ZGrep for first occurence of pattern *after* given line
- using Zgrep and awk to parse a .tgz file and print first row
- How to get frequency of logging using bash if each line contains a timestamp?
- zgrep on multiple input variables issue
- How to use zgrep and regular expression?
- How can I specify a regex in a zgrep/zcat command?
- How to use zgrep to display all words of a x size from a wordlist?
- Why won't zgrep show the actual matches?
- Python subprocess.check_output conver to windows
- Get all occurrences of a string within a directory(including subdirectories) in .gz file using bash?
- zipgrep with wildcard to match multiple files
- How could I change this egrep script to a zgrep script and still have it work?
- Unique count of a value in a zipped file based on other constraints on surrounding lines
- how to use grep to parse out columns in csv
- I am a microbiologist and new to PowerShell and I have to create a script using zgrep -u
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Hello and welcome to stack overflow. I'm very sorry that some people here read over your non-IT background and certainly answer cryptically for you.
About your problem:
First, if possible, install the ImportExcel module on your machine using this PowerShell command:
After that we can run this small script to execute zgrep for each row in the Excel Document:
This should be all you need for your problem.