Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: Xterra
808
Posted By Xterra
Don I modified a bit your script to output the...
Don
I modified a bit your script to output the total count and give some format:

awk -v gene="gene-a gene-b" -v lengths="3 6" -v strings="GCATGAAAACATACA TTTCCAGAAATTGT" '
BEGIN { nString =...
808
Posted By Xterra
Don Thanks! PS. If I would like to search for...
Don
Thanks!
PS. If I would like to search for more than one string (GCATGAAAACATACA and TTTCCAGAAATTGT) and report different number characters (3 and 6. I should be able to do it passing the...
808
Posted By Xterra
I do have access to awk. I would be interested on...
I do have access to awk. I would be interested on seeing a solution with awk too.
808
Posted By Xterra
Outputting characters after a given string and reporting the characters in the row below --sed
I have this fastq file:

@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA
+test-1...
550
Posted By Xterra
Reseting row count every given number of rows
I have a file with 48 rows. I am counting 6 rows and adding 6 to that number and repeating the operation, and then output the value in column 1. For the second column, I would like to get sort of a...
399
Posted By Xterra
Replacing filename with sed in bash script
I need to cat two files with similar names. I am using the following script:

#!/bin/bash
if [[ -f $1 ]]
then
file=$1
file2="${file%R1.fastq}R2.fastq"
echo fetching...
1,550
Posted By Xterra
Guys Thank you so very much! Bakunin, it did...
Guys
Thank you so very much! Bakunin, it did not even cross my mind to use the Hold, Get and Exchange commands for this task. Thanks a TON for a very detailed explanation. Don, thank you so very...
1,550
Posted By Xterra
Outputting sequences based on length with sed
I have this file:

>ID1
AA
>ID2
TTTTTT
>ID-3
AAAAAAAAA
>ID4
TTTTTTGGAGATCAGTAGCAGATGACAG-GGGGG-TGCACCCC

Add I am trying to use this script to output sequences longer than 15 characters:
...
470
Posted By Xterra
Rudy Thanks a TON! Quick question, why BEGIN{...
Rudy
Thanks a TON! Quick question, why BEGIN{ RS="^@"; FS="\n" } would not work?
470
Posted By Xterra
awk and seen to report duplicates
I have this file:

@Muestra-1
agctgcgagctgcgacccgggttatataggaagagacacacacaccccc
+
!@$#%^&*()@^#&HH!&*(@&#*(FT^%$&*()*&^%@
@Muestra-2
agctgcgagctgcgacccgggttatataggaagagacacacacaccccc
+...
552
Posted By Xterra
Scrutinizer Your first did the trick Thanks!
Scrutinizer
Your first did the trick
Thanks!
270
Posted By Xterra
got it ! Thanks
got it ! Thanks
270
Posted By Xterra
Selectively deleting newlines with sed
I have a file that look like this:

>Muestra-1
agctgcgagctgcgaccc
gggttatata
ggaagagacacacacaccccc
>Muestra-2
agctgcg
agctgcgacccgggttatataggaagagac
acacacaccccc
>Muestra-3...
552
Posted By Xterra
That worked like a charm! Thanks a TON! PS....
That worked like a charm! Thanks a TON!
PS. Still, I am bit curious, would it be possible to fix the script in such way that can be run directly from the cmd terminal?
552
Posted By Xterra
Differences with gawk on cmd vs cygwin
I have this script (thanks Don!) that runs as expected in cygwin:

gawk -F, 'NR == 1{print "Source,Well_Source,Volume,Destination_Well,Destination"; OFS = ","; next}/Ladder/{next}LAST2 && $2 !=...
1,517
Posted By Xterra
Installing RPM package using alien on WSL Ubuntu
I was just flirting with the idea of installing one package (bcl2fas2) on my WSL:Ubuntu using alien. However, when I run

sudo alien bcl2fastq2-v2.20.0.422-Linux-x86_64.rpm

I get the following...
1,258
Posted By Xterra
That was the problem actually. Thanks!
That was the problem actually.
Thanks!
1,258
Posted By Xterra
sorry! My bad, I meant : sed '1isometext'...
sorry! My bad, I meant :

sed '1isometext' infile


Or even


echo a | sed '1isometext'


return the same error on MAC:


sed: 1: "1isometext": command i expects \ followed by text
...
1,258
Posted By Xterra
GNU sed running on Mac
Super basic question. I installed sed GNU on a MAC running High Sierra. However, when I run sed '1i>sometext, I get the following error:

sed: 1: "1isometext"; command i expects \ followed by...
648
Posted By Xterra
Rudy Thanks!
Rudy
Thanks!
648
Posted By Xterra
No complains here! Works like a charm! For...
No complains here! Works like a charm!

For my own education, why this wouldnt work?

sed 'N; s/^.*\n//;=;/^[0-9]\+/ s/^/>seq /' file

Or this:

sed '/^>/s/.*//;/^$/=;/^$/d;s/[1-9].*/echo...
648
Posted By Xterra
Using = with sed to increase sequence count
I have a fasta file like this one:

>ID1
AAAAAA
>ID2
TTTTTT

And I am using this sed script to increase the count sequence

sed '/^>/s/.*//;/^$/=;/^$/d' text.txt | sed 's/[1-9].*/echo ">seq"...
814
Posted By Xterra
Thanks a TON! That worked like a charm
Thanks a TON! That worked like a charm
814
Posted By Xterra
This did not work: sed ':a...
This did not work:

sed ':a /^>/!N;s/\r\n?\n\([^>]\)/\1/;ta'

Or this:

sed ':a /^>/!N;s/\r?\n\([^>]\)/\1/;ta'
814
Posted By Xterra
Multiple regex in sed
I am using the following sed script to remove new lines (\r\n and \n), except from lines starting with >:

sed -i ':a /^>/!N;s/\r\n\([^>]\)/\1/;s/\n\([^>]\)/\1/;ta'

Is there a way to include...
Showing results 1 to 25 of 365

 

Featured Tech Videos

All times are GMT -4. The time now is 12:38 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy