Search Results

Search: Posts Made By: yifangt
Forum: Programming 01-18-2020
32,678
Posted By yifangt
I meant static library and archive are different...
I meant static library and archive are different names for *.a files, but not clear the options to the *.a files and *.so files in the command line for my sample code.
I'm so sorry for the...
Forum: Programming 01-17-2020
32,678
Posted By yifangt
Thanks Greg, and Neo---although your input is...
Thanks Greg, and Neo---although your input is more than I expected.
I found the topic deviated from the original point I was asking, because there are many aspects hidden behind my question that I...
Forum: Programming 01-16-2020
32,678
Posted By yifangt
Use of variable $ORIGIN & -rpath
If you link to a shared library intead of the archive it's a little more complicated.
Thank you for point that out. Actually I meant the archive here.
I happened to found this article...
Forum: Programming 01-15-2020
32,678
Posted By yifangt
Come to ld_config now
The compiling worked after:$ LIBROOT="/home/yifangt/Study/C/VCF/htslib-1.10.2"
$ gcc -Wall -O3 -o vcf_parser01 vcf_parser01.c vcf.c -I ${LIBROOT}/htslib -I ${LIBROOT} -L ${LIBROOT} -lhts
$...
Forum: Programming 01-15-2020
32,678
Posted By yifangt
library path(s) and subfolders within
Thanks!

Does the -L option ensure the sub-directories are searched recursively?

The -lhtslib-1.10.2 option of your command line may be wrong in this case as htslib-1.10.2 is a folder under...
Forum: Programming 01-15-2020
32,678
Posted By yifangt
Thanks Neo and Greg! $ pwd ...
Thanks Neo and Greg!
$ pwd
/home/yifangt/Study/C/VCF
$ ls ${PWD}
config.h for_post hts_internal.h htslib htslib-1.10.2 htslib-1.10.2.tar.bz2 README textutils_internal.h tmp.err vcf.c ...
Forum: Programming 01-14-2020
32,678
Posted By yifangt
How to make use others' C library installed not for the system-wide (Ubuntu/Linux)?
I have downloaded and installed a library called htslib (http://www.htslib.org/download/) for specific bioinformatic use but not for the system (I'm using Ubuntu 18.04). Only parts of the library is...
Forum: Programming 11-07-2019
22,643
Posted By yifangt
Thanks! Corona688 in this forum had similar...
Thanks!
Corona688 in this forum had similar code, but I skipped that part not to making my question too branchy.
Forum: Programming 11-07-2019
22,643
Posted By yifangt
I was so stupid when you first pointed out that I...
I was so stupid when you first pointed out that I should add a line to empty str1 with str1[0]=0; but I thought you had typos so that I simply added the single quotes: str1[0]='0'; Last night I...
Forum: Programming 11-06-2019
22,643
Posted By yifangt
last variable gets printed twice
Thanks!
Change the char array size ID[12], str1[12] resolved the ID bug!

Last bug(hopefully!): the last variable is printed twice, that I really could not understand.
#include <stdio.h>...
Forum: Programming 11-04-2019
22,643
Posted By yifangt
last field for sscanf() is incorrectly parsed
Change the RECORD increment i++; according to your correction fixed the problem!
Thank you so much!
---------------------------------------------------------------------------
Wait! There is...
Forum: Programming 11-04-2019
22,643
Posted By yifangt
segment fault
Thanks, did you try the attached file with 4 RECORD?
I always got segment fault at the same spot of the input, i.e. the 10th variable TotalHetHomRatio[8] within the 2nd RECORD, sample2.
Also I...
Forum: Programming 11-04-2019
22,643
Posted By yifangt
whole program buggy code
Thanks!
Then there must be something else wrong with my program. I decided to post the whole program here seeking more help to debug. A test file is also attached for trial.

#include <stdio.h>...
Forum: Programming 11-02-2019
22,643
Posted By yifangt
Format specifier for sscanf() in C
Hello, I have formatted lines delimited by colon ":", and I need to parse the line into two parts with sscanf() with format specifiers.
infile.txt:
Sample Name: sample1
SNPs ...
6,758
Posted By yifangt
Bash variable expansion in awk script
Hello,
I need to split a file into two of different locations by re-direction in awk.
cat infle
aaa 1 3
bbb 2 4
aaa 3 3
bbb 4 4
aaa 5 3
bbb 6 4

cat...
8,099
Posted By yifangt
Scrutinizer: Could you elaborate this part ? ...
Scrutinizer:
Could you elaborate this part ?

FS=RS; RS=">";I tried FS=RS=">"; but it did not work. What's the difference between the two: FS=RS; RS=">"; vs FS=RS=">";
8,099
Posted By yifangt
That's exactly what I meant! Thanks RudiC!
That's exactly what I meant!

Thanks RudiC!
8,099
Posted By yifangt
combine and upgrade by the second fasta file
I put my answer back as I met the scenarios:
1) when file2.fasta contains more entries than in file1.fasta and vice versa. and
2) when the sequence part can have more than one row;
awk...
8,172
Posted By yifangt
Thanks! Original question is about the...
Thanks!
Original question is about the synchronizing of echo and wc -l output, but this definitely enhanced more than I expected. I just installed pigz, and will give it try soon.
8,172
Posted By yifangt
parallel to restrict the process number
@bakunin @all
Your comments are exactly what I wanted to catch. Here, I reformed my script with GNU parallel to control the process limits, but I hit another wall:
parallel -a $LIST1 -j 48...
8,172
Posted By yifangt
@Rudic No, still the same as the original...
@Rudic
No, still the same as the original problem.
I'll do the single files and then concatenate them. Thanks!
8,172
Posted By yifangt
Attach filename to wc results on massive number of files
Hello,
I have massive number of big files that needed to be counted for the total number of lines (> 100x millions) each. I want the file name attached to the count results so that they are aligned...
3,184
Posted By yifangt
Thanks RudiC! I like these tricks: SUM[$1...
Thanks RudiC!
I like these tricks:
SUM[$1 OFS int($2/100)*100] #A very good trick to me for simple situations
...
for (s in SUM) {split (s, T, OFS)
if ($1 == T[1] && $2 >= T[2] && $2...
3,184
Posted By yifangt
Yes, they are grouped and sorted nicely.
Yes, they are grouped and sorted nicely.
3,184
Posted By yifangt
Each N1 range is different without overlapping...
Each N1 range is different without overlapping for sure, as they are evenly spaced except the last one. Say N1 has 7550bp long, that it is modulo-ed by 100, the last range would be N1 7500 7550.
...
Showing results 1 to 25 of 500

 
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy