1006 days ago
Commandline to Extract a list of specific read IDs from a bam file
#Save all the IDs in IDs.txt file #Run it on BAM file samtools view file.bam | fgrep -w -f IDs.txt1006 days ago
Tadpole is 250x faster than SPADes assembler !
lege@jit-Lenovo-ideapad-320-15ISK:~/Downloads/MyTools/Vir$ tadpole.sh Written b...ty scores for marked bases to this. A level of 0 will also convert the base to an N. errormult1...986 days ago
Oneliner to convert lower-case to sequence masked with Ns
perl -pe '/^[^>]/ and $_=~ s/[a-z]/N/g' genomic.fna > genomic.N-masked.fna awk '{if(/^[^>]/)gsub(/[a-z]/,"N");print $0}' genomic.fna > genomic.N-masked.fna960 days ago
Onliner to convert multi line fasta to single line fasta !
#Oneliner to convert awk '/^>/ {printf("\n%s\n",$0);next; } { printf("%s",$0);} END {printf("\n");}' < file.fa > fileres.fa #Then delete the first empty line tail -n +2 fileres.fa > fileout.fa938 days ago
Perl onliner to check the ids in two files !
perl -lane 'BEGIN{open(A,"ids2.txt"); while(){chomp; $k{$_}++}} if (defined($k{$F[0]})) {print "$_\t$F[0]\t1"} else {print "$_\tNA\t0"}; ' ids1.txt > aaa.xls937 days ago
Bash script to simulate a genome !
# Reference https://github.com/chhylp123/hifiasm/issues...nda activate bcftools1.10.2 # Use Seqtk to convert soft-masked bases to upper-ca...1_ASM340174v1_genomic.fna_upper.fasta.gz # Convert to diploid with approximately...927 days ago
Extract the values using ids !
#Awk script awk 'NR==FNR{tgts[$1]; next} $1 in tgts' file1 file2 Look: $ cat file1 11002 10995 48981 79600 $ cat file2 10993 item 0 11002 item...904 days ago
Extract fasta sequences with ids in another file !
#Ids are in test.txt - one ids per line #sequences are in test.fa grep -w -A 2 -f test.txt test.fa --no-group-separator # seqtk seqtk subseq test.fa test.txt #faSomeRecods faSomeRecords in.fa listFile out.fa # seqkit seqkit grep -n -f list.txt sequences.fas > newfile2.fas899 days ago
Omicron Sequences accession number !
EPI_ISL_6647956 EPI_ISL_6647957 EPI_ISL_6647958 EPI_ISL_6647959 EPI_ISL_6647960 EPI_ISL_6647962 EPI_ISL_6647961 Search the IDs in https://www.epicov.org/epi3/frontend895 days ago