Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bioinformatics]

Use this tag for questions relating to common bioinformatics tasks performed on a *nix system. Things like manipulating/converting between standard biological text formats, extracting data of interest from such formats etc.

1
vote
1answer
69 views

How to grep all lines from one file in specific column in multiple other files?

I have one file: combined.txt like this: GO_GLUTAMINE_FAMILY_AMINO_ACID_METABOLIC_PROCESS REACTOME_APC_CDC20_MEDIATED_DEGRADATION_OF_NEK2A LEE_METASTASIS_AND_RNA_PROCESSING_UP RB_DN.V1_UP ...
-1
votes
1answer
26 views

Sort based on second column and list from highest to lowest

TGAAACATGCCTTTCACCTCCTGCCATGATTGTGAGGCCT 2 GTGTTGCCCAGGTTGGTTTCAAACTCAGCTCAAGTGATCT 1 GAGACTCCTTCAGGAGACTGGTCCCCTGTCCTCGCCTCTC 3 CATGTTCTCCTGGAAGCCATGTGAGGAAGGCACATCATGG 8 ...
0
votes
3answers
42 views

Add a new line (\n) in front of every forward arrow (>)

I have file1.fa in the format as below: >XXX[YY] ZZZZZZ>XXX[YY] ZZZZZZ>XXX[YY] ZZZZZZ I was trying to add a new lines before the forward arrow using sed command but it doesn't work. sed 's/...
1
vote
1answer
41 views

for loops to grep multiple texts from parent file to multiple files in single command

I have 29 fasta files (.fa as extension) named and stored sequences according to their genes. (Example: ribosomal protein L1, ribosomal protein L6P/L9E,...) There were a total of 722 species ...
0
votes
1answer
48 views

How do I download a public dataset from the internet to linux? [closed]

I need to download a public dataset (from OpenNeuro) online to linux so I can work with this data. How to do so?
0
votes
2answers
65 views

Remove and Add sequence information at specific position in a file

I have to retrieve a specific information with known length from my fastq file and add it in another position. For example given as input the following fastq file: @SRR5394526.1 1 length=150 ...
0
votes
1answer
15 views

delete rows with duplications in first column in bash

I have a tab delimited .txt file and want to delete rows that have duplications in the first column. If this can be done without sort, that would be amazing, but I've kind of come to terms with that I ...
0
votes
1answer
27 views

how to substitute strings in a set of files with different strings? [closed]

I have a set of vcf files, each one has a string started with 'SRR'.e.g., in file1 I have the following line: #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SRR2481146_1 In file2, I have: ...
1
vote
0answers
31 views

Compute median over windows and groups

I have a file that looks like this: chr pos value A 1 23 A 2 32 ... A 200 32 ... B 1 41 B 2 28 ... The file is sorted by chr and pos. The ... is just to show the lots of rows in ...
1
vote
1answer
252 views

mkdir command not found?

I think I messed up the PATH. I was installing Bioperl and tried to changed path. The correct code should be: $ export PATH=/usr/local/ActivePerl-5.26/bin:$PATH $ export PATH=/usr/local/ActivePerl-5....
3
votes
1answer
56 views

Find duplicate String inside a text with middle near each other

I need to find a string of 13 character length in a text file that has a duplicate close to it. It referencing to the mutation 13 of the genomes. For example: ACGAATTGCAGCCACAGTACGAATCGCAGCC. It ...
0
votes
1answer
25 views

Delete rows where 5 or more columns have values less than 3

I have a dataset of RNAseq from featureCounts which I have merged. I have 3 conditions with 3 replicates. I want to delete rows where 5 or more columns have values less than 3 of gene expression Here ...
0
votes
1answer
76 views

Syntax for regular expression searching for DNA codons

I have to write a script for an assignment which will take the file name as a command and output every unique 3 base codon in the file and how many times it occurs in descending order. The script has ...
0
votes
1answer
25 views

how to copy columns from file 2 to file 1 when some columns matches between 2 files

I have a file head top_candidates 25 elevation_e gene1 20 9 0.0246022994932004 5 8 10.9217937824527 30 elevation_e gene1 59 18 0.0246022994932004 7 12 15.653559774527 31 elevation_e ...
-2
votes
2answers
62 views

Find longest stretch of pattern from centre of sequence

How to calculate the longest consecutive pattern of C/T anywhere in sequence and longest consecutive pattern of C/T from centre CCCCTGTTGCCAAACAATGC TTTTCCCGCCTTTGGCCTAC ...
-1
votes
3answers
630 views

Find how many times a certain DNA base sequence occurs in a file

The assignment is to write a bash script named “countmatches” that will display the number of times a certain sequence, such as aac, appears in a specified file. The script should expect at least two ...
1
vote
2answers
52 views

How to match a column from File1 to get its corresponding fasta sequences in File 2?

May I kindly ask how to match all values of the first column in File with the line text in File 2 so I can copy the fasta sequences of all Object ID in File 1? File 1.csv file Object_ID, Length, ...
1
vote
3answers
665 views

Cleaning a genes database polluted by non-numeric characters except plus and minus signs

I have this genes database which is completely messed up by extra non-alphanumeric values. This happened as a sort of encryption to the data which was made incorrectly, and I don't know how to clean ...
0
votes
3answers
81 views

extracting information from a column [closed]

I have a file which looks like this: chr1 HAVANA exon 12613 12721 . + . gene_id "ENSG00000223972.5"; transcript_id "ENST00000456328.2"; gene_type "transcribed_unprocessed_pseudogene";...
7
votes
2answers
390 views

Find any line in VI that has something other than ATCG

I have a file of genomic data that is approximately 5 million lines long and should have only the characters A, T, C, and G in it. The problem is, I know how large the file should be, but it's ...
2
votes
1answer
105 views

Adding more information to a string

I have a gtf file like this: ChrI Coding_transcript gene 8451772 8509212 . - . gene_id "UMM-S589-0.12-gene-1" ChrI Coding_transcript exon 8501974 8509212 . ...
1
vote
4answers
97 views

Match if a column partially matches another column

I am trying to compare columns of the same file. The table looks like this: G A AA GG CC TT CT C T CC TT GG GG AA What I want to do is to compare the first and second column with the rest, ...
0
votes
3answers
46 views

removing variable string on many files

I have many files that contain similar strings as: >33100_Pseudomonas_etcetera1 texttexttext >33632_Pseudomonas_etcetera2 texttexttext >36406_Pseudomonas_etcetera3 texttexttext and I need ...
2
votes
3answers
982 views

extract lines that match a list of words in another file

I have file 1 which have those lines: ATM 1434.972183 BMPR2 10762.78192 BMPR2 10762.78192 BMPR2 1469.14535 BMPR2 1469.14535 BMPR2 1738.479639 BMS1 4907.841667 BMS1 4907.841667 BMS1 880.4532628 BMS1 ...
0
votes
3answers
86 views

Extract specific thing from each row in column

I have a file with ~13K lines, containing two columns. I want to extract the values in 'phNAME': 'value', but each line could have more than one phNAME. In case there is more than one phNAME on a ...
0
votes
2answers
369 views

How to write access to default /etc/init.d

I am trying to install Proteios software in Ubuntu 16. One of the requirement for this software is (*) Write access to $SERVICE_PATH(default /etc/init.d) How can I achieve this?
1
vote
4answers
56 views

Deleting text after a character multiple times in one column

So I have certain text set up in the second and third columns of my file like so: GO:0005634^cellular_component^nucleus`GO:0003677^molecular_function^DNA binding` I want to get rid of all of the ...
1
vote
1answer
395 views

remove a read from a fastq file

I want to remove four lines of a fastq file. For example, usually the file looks like this: (for each sample correspond four lines) @M04241:303:000000000-BR896:1:1102:21438:12389 1:N:0:TATGGCAC ...
1
vote
1answer
55 views

finding the starting and ending positions of a common identifier

I have a file looking like this chrom_pos chrom position BF window_id "Chr01__69500112" 1 69500112 10.1214802 "window_1391" "Chr01__69500129" 1 69500129 -7.59047205 "window_1391" "...
0
votes
2answers
49 views

Redirecting sed matches to individual files

I have a file containing a list of DNA sequence names and another containing DNA sequences. They look like this: $ cat list.txt seq1 seq3 $ cat sequences.txt >seq1 AAAAA AAAAA >seq2 CCCCC ...
-4
votes
1answer
142 views

single text file on require multiple operations using a shell or bash script

My Source File : Test.txt Note : File is a tab delimited and few columns doesn't have column names: Chr Start End Alt Value Exo 0 10 . 1.50 . 20:-2 30:0.9 50:50 50 ...
0
votes
1answer
41 views

Extracting lines containing pattern + next line

I have two files: one containing a list of IDs (file A) and other containing a list of IDs plus their corresponding text -which is always on the next line- (file B). File A: >161@1983 >947@...
2
votes
3answers
1k views

Print text before and after match, from a specific beginning and to an ending string

I am trying to extract entries from within a large Genbank file, with many thousands of entries. For a search string, I'm using a unique gene name – that works fine. The tricky bit is that I'd like to ...
0
votes
2answers
461 views

How to concatenate RNA-seq files generated in differnt lanes [closed]

I have very large RNA-seq files generated in different lanes. I extracted few of the file names as shown below. MC9_FNEN_638A_S19_L008_R1_001.fastq.gz MC9_FNEN_638A_S19_L008_R2_001.fastq.gz ...
1
vote
3answers
253 views

script to parse file for two consecutive lines of unequal length

I'm trying to parse a large file where every 2 consecutive lines have the same length (the text is completely different). I've searched, and my first post here. I found a script and tried to modify it ...
3
votes
3answers
121 views

Comparing two files linewise and if pattern of file 1 is not found (fully or partially) in file 2 then print line of file 1

I have two files: file1 (search): 1 GACGGAGGATGCAAGTGTTATCCGGAATCACTGGGCGTAAAGTTTTTTTTT 2 GACGGAGGATGCAAGTGTTATCCGGAAT 3 GACGGAGGATGCAAGTGTTATCCGGAATCACTGGGCGTAAAGCGTCC 4 ...
0
votes
1answer
504 views

Extracting Columns and Rows from a file [closed]

I have a list of some 164 SNPs that I need to match to a very large .txt file from a database and extract some columns and rows matching those SNPs from that text file and print it into a new text ...
-5
votes
3answers
103 views

scoring DNA script file [closed]

I want to score DNA sequence A = 1 T = 2 C = 3 G = 4 My input is ATGGCGATTGA AGCTTAGCCAG AGCTTAGGGAA My output should be seq_number 1 has score = 28 seq_number 2 has score = 28 ...
-1
votes
1answer
337 views

converting fasta file to plain text

how to convert fasta format with ">" to plain text file ex. input :fasta file >1M14 GATCGGACTAGCTAA output :plain text file GATCGGACGAGCTAA
-1
votes
2answers
183 views

how to print complement strand from input strand

I have problem to print complementary strand sequence of DNA also with reverse one I want output like this Please enter DNA sequence of template strand: GTAAGCCGGAAGG DNA sequence of antisense strand ...
0
votes
2answers
64 views

Extract value from formatted text with bash

I've got a .fasta file, which is strictly a formatted text containing some informations about DNA. Here's its common structure: >NODE_18_length_75451_cov_83.3021 ...
0
votes
2answers
39 views

Remove rows which contain duplicate strings between the first 4 characters of two columns

I have a large file that contains 4 columns and 7,000 lines. I need to remove the rows in which the start of the second column is the same as the start to the fourth column. Input: Gator_locus75 ...
1
vote
3answers
89 views

Change numbers in this form: 0.873000 / 0,234000 into this form: 87 / 23

From a file like this one (phylogenetic tree in which branch supports are between 0 and 1): (AJirio:0.00207,(AJama:0.00176,(AJtok:0.00034,AJkago:0.00057)0.832000:0.00080)0.934000:0.00111)0.923000 I ...
2
votes
1answer
241 views

How to find characters between 2 strings and append them with some text to end of line?

I am dealing with fasta files having lines such as: \>97977-100;sample=Samp1 TAATGATGATTTGT \>97978-60;sample=Samp2 AACATTCAACGCGGTCGGTGAGTA \>97979-30;sample=Samp3 ...
-2
votes
3answers
24 views

Compare Columns of genes in file and output the gene and number of column it is present in linux

I have 3 coumns of genes in a file like this col1 col2 col3 CXCL9 CXCL9 CXCL9 MAP2K6 MAP2K6 MAP2K6 CXCL10 CXCL10 CXCL11 I want to match the 3 columns and see which gene is present in ...
0
votes
2answers
45 views

copy the names of DNA sequences in a phylogenetic tree file and add the names of the species to it

From a file looking like this one : (AJirio_TR15329|c4_g1_i4|m.30470:0.00230,(AJama_TR16613|c5_g2_i2|m.30203:0.00171,(AJkago_TR11651|c5_g2_i1|m.3847:0.00057,AJtok_TR11413|c7_g1_i1|m.3527:0.00033)1.00 ...
0
votes
3answers
61 views

extract block of text from another file

i want to extract block of text based on ids present in another file, Input >Feature scaffold1 1 100 g 101 200 g 201 300 g 500 500 r 900 1000 r >Feature scaffold2 1 100 g 01 500 g 200 ...
2
votes
5answers
94 views

Change a character in a column depending on a instruction from another column

I am trying to set up a script which will convert a codon sequence to another codon sequence depending on variants I find in my NGS data. Currently, My script creates a tab-delimited output file, ...
0
votes
2answers
117 views

conditional replacement of rows with a number

I have a big file containing 27 columns and nearly 6 million rows. The following is a little example of my file head data 0.65 0.722222 1.0 0.75 0 0.35 0.277778 0.0 0.25 0 0 ...
1
vote
3answers
59 views

how to I add characters to rows that do not have them

The first few line of my data looks like scaffold10x_1 AUGUSTUS gene 3591 3908 0.61 - . g1 scaffold10x_1 AUGUSTUS transcript 3591 3908 0.61 - . g1.t1 ...